linux/include/uapi/asm-generic/mman-common.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef __ASM_GENERIC_MMAN_COMMON_H
#define __ASM_GENERIC_MMAN_COMMON_H

/*
 Author: Michael S. Tsirkin <[email protected]>, Mellanox Technologies Ltd.
 Based on: asm-xxx/mman.h
*/

#define PROT_READ
#define PROT_WRITE
#define PROT_EXEC
#define PROT_SEM
/*			0x10		   reserved for arch-specific use */
/*			0x20		   reserved for arch-specific use */
#define PROT_NONE
#define PROT_GROWSDOWN
#define PROT_GROWSUP

/* 0x01 - 0x03 are defined in linux/mman.h */
#define MAP_TYPE
#define MAP_FIXED
#define MAP_ANONYMOUS

/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */
#define MAP_POPULATE
#define MAP_NONBLOCK
#define MAP_STACK
#define MAP_HUGETLB
#define MAP_SYNC
#define MAP_FIXED_NOREPLACE

#define MAP_UNINITIALIZED

/*
 * Flags for mlock
 */
#define MLOCK_ONFAULT

#define MS_ASYNC
#define MS_INVALIDATE
#define MS_SYNC

#define MADV_NORMAL
#define MADV_RANDOM
#define MADV_SEQUENTIAL
#define MADV_WILLNEED
#define MADV_DONTNEED

/* common parameters: try to keep these consistent across architectures */
#define MADV_FREE
#define MADV_REMOVE
#define MADV_DONTFORK
#define MADV_DOFORK
#define MADV_HWPOISON
#define MADV_SOFT_OFFLINE

#define MADV_MERGEABLE
#define MADV_UNMERGEABLE

#define MADV_HUGEPAGE
#define MADV_NOHUGEPAGE

#define MADV_DONTDUMP
#define MADV_DODUMP

#define MADV_WIPEONFORK
#define MADV_KEEPONFORK

#define MADV_COLD
#define MADV_PAGEOUT

#define MADV_POPULATE_READ
#define MADV_POPULATE_WRITE

#define MADV_DONTNEED_LOCKED

#define MADV_COLLAPSE

/* compatibility flags */
#define MAP_FILE

#define PKEY_DISABLE_ACCESS
#define PKEY_DISABLE_WRITE
#define PKEY_ACCESS_MASK

#endif /* __ASM_GENERIC_MMAN_COMMON_H */