aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/arch/alpha/include/uapi/asm/mman.h38
-rw-r--r--tools/arch/arc/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/arm/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/arm64/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/frv/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/h8300/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/hexagon/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/ia64/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/m32r/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/microblaze/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/mips/include/uapi/asm/mman.h39
-rw-r--r--tools/arch/mn10300/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/parisc/include/uapi/asm/mman.h38
-rw-r--r--tools/arch/powerpc/include/uapi/asm/mman.h13
-rw-r--r--tools/arch/s390/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/score/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/sh/include/uapi/asm/mman.h4
-rw-r--r--tools/arch/sparc/include/uapi/asm/mman.h13
-rw-r--r--tools/arch/tile/include/uapi/asm/mman.h13
-rw-r--r--tools/arch/x86/include/uapi/asm/mman.h5
-rw-r--r--tools/arch/xtensa/include/uapi/asm/mman.h38
-rw-r--r--tools/include/uapi/asm-generic/mman-common.h75
-rw-r--r--tools/include/uapi/asm-generic/mman.h22
-rw-r--r--tools/include/uapi/linux/mman.h13
-rw-r--r--tools/perf/MANIFEST4
25 files changed, 363 insertions, 0 deletions
diff --git a/tools/arch/alpha/include/uapi/asm/mman.h b/tools/arch/alpha/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..6ed4ad44a289
--- /dev/null
+++ b/tools/arch/alpha/include/uapi/asm/mman.h
@@ -0,0 +1,38 @@
1#ifndef TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 17
4#define MADV_DOFORK 11
5#define MADV_DONTDUMP 16
6#define MADV_DONTFORK 10
7#define MADV_DONTNEED 6
8#define MADV_HUGEPAGE 14
9#define MADV_MERGEABLE 12
10#define MADV_NOHUGEPAGE 15
11#define MADV_NORMAL 0
12#define MADV_RANDOM 1
13#define MADV_REMOVE 9
14#define MADV_SEQUENTIAL 2
15#define MADV_UNMERGEABLE 13
16#define MADV_WILLNEED 3
17#define MAP_ANONYMOUS 0x10
18#define MAP_DENYWRITE 0x02000
19#define MAP_EXECUTABLE 0x04000
20#define MAP_FILE 0
21#define MAP_FIXED 0x100
22#define MAP_GROWSDOWN 0x01000
23#define MAP_HUGETLB 0x100000
24#define MAP_LOCKED 0x08000
25#define MAP_NONBLOCK 0x40000
26#define MAP_NORESERVE 0x10000
27#define MAP_POPULATE 0x20000
28#define MAP_PRIVATE 0x02
29#define MAP_SHARED 0x01
30#define MAP_STACK 0x80000
31#define PROT_EXEC 0x4
32#define PROT_GROWSDOWN 0x01000000
33#define PROT_GROWSUP 0x02000000
34#define PROT_NONE 0x0
35#define PROT_READ 0x1
36#define PROT_SEM 0x8
37#define PROT_WRITE 0x2
38#endif
diff --git a/tools/arch/arc/include/uapi/asm/mman.h b/tools/arch/arc/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..f76765dbaafa
--- /dev/null
+++ b/tools/arch/arc/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/arm/include/uapi/asm/mman.h b/tools/arch/arm/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..f2006385e203
--- /dev/null
+++ b/tools/arch/arm/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/arm64/include/uapi/asm/mman.h b/tools/arch/arm64/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..a7dd975bb33e
--- /dev/null
+++ b/tools/arch/arm64/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/frv/include/uapi/asm/mman.h b/tools/arch/frv/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..99bba054e795
--- /dev/null
+++ b/tools/arch/frv/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/h8300/include/uapi/asm/mman.h b/tools/arch/h8300/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..df95096c2a7a
--- /dev/null
+++ b/tools/arch/h8300/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/hexagon/include/uapi/asm/mman.h b/tools/arch/hexagon/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..f1adcce90f37
--- /dev/null
+++ b/tools/arch/hexagon/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/ia64/include/uapi/asm/mman.h b/tools/arch/ia64/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..23420eb30d92
--- /dev/null
+++ b/tools/arch/ia64/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/m32r/include/uapi/asm/mman.h b/tools/arch/m32r/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..a35ebd68add9
--- /dev/null
+++ b/tools/arch/m32r/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/microblaze/include/uapi/asm/mman.h b/tools/arch/microblaze/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..75f460abbe58
--- /dev/null
+++ b/tools/arch/microblaze/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/mips/include/uapi/asm/mman.h b/tools/arch/mips/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..db88fa41e74c
--- /dev/null
+++ b/tools/arch/mips/include/uapi/asm/mman.h
@@ -0,0 +1,39 @@
1#ifndef TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 17
4#define MADV_DOFORK 11
5#define MADV_DONTDUMP 16
6#define MADV_DONTFORK 10
7#define MADV_DONTNEED 4
8#define MADV_HUGEPAGE 14
9#define MADV_HWPOISON 100
10#define MADV_MERGEABLE 12
11#define MADV_NOHUGEPAGE 15
12#define MADV_NORMAL 0
13#define MADV_RANDOM 1
14#define MADV_REMOVE 9
15#define MADV_SEQUENTIAL 2
16#define MADV_UNMERGEABLE 13
17#define MADV_WILLNEED 3
18#define MAP_ANONYMOUS 0x0800
19#define MAP_DENYWRITE 0x2000
20#define MAP_EXECUTABLE 0x4000
21#define MAP_FILE 0
22#define MAP_FIXED 0x010
23#define MAP_GROWSDOWN 0x1000
24#define MAP_HUGETLB 0x80000
25#define MAP_LOCKED 0x8000
26#define MAP_NONBLOCK 0x20000
27#define MAP_NORESERVE 0x0400
28#define MAP_POPULATE 0x10000
29#define MAP_PRIVATE 0x002
30#define MAP_SHARED 0x001
31#define MAP_STACK 0x40000
32#define PROT_EXEC 0x04
33#define PROT_GROWSDOWN 0x01000000
34#define PROT_GROWSUP 0x02000000
35#define PROT_NONE 0x00
36#define PROT_READ 0x01
37#define PROT_SEM 0x10
38#define PROT_WRITE 0x02
39#endif
diff --git a/tools/arch/mn10300/include/uapi/asm/mman.h b/tools/arch/mn10300/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..81faa5d1b2dc
--- /dev/null
+++ b/tools/arch/mn10300/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/parisc/include/uapi/asm/mman.h b/tools/arch/parisc/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..c4a9d9f12d55
--- /dev/null
+++ b/tools/arch/parisc/include/uapi/asm/mman.h
@@ -0,0 +1,38 @@
1#ifndef TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 70
4#define MADV_DOFORK 11
5#define MADV_DONTDUMP 69
6#define MADV_DONTFORK 10
7#define MADV_DONTNEED 4
8#define MADV_HUGEPAGE 67
9#define MADV_MERGEABLE 65
10#define MADV_NOHUGEPAGE 68
11#define MADV_NORMAL 0
12#define MADV_RANDOM 1
13#define MADV_REMOVE 9
14#define MADV_SEQUENTIAL 2
15#define MADV_UNMERGEABLE 66
16#define MADV_WILLNEED 3
17#define MAP_ANONYMOUS 0x10
18#define MAP_DENYWRITE 0x0800
19#define MAP_EXECUTABLE 0x1000
20#define MAP_FILE 0
21#define MAP_FIXED 0x04
22#define MAP_GROWSDOWN 0x8000
23#define MAP_HUGETLB 0x80000
24#define MAP_LOCKED 0x2000
25#define MAP_NONBLOCK 0x20000
26#define MAP_NORESERVE 0x4000
27#define MAP_POPULATE 0x10000
28#define MAP_PRIVATE 0x02
29#define MAP_SHARED 0x01
30#define MAP_STACK 0x40000
31#define PROT_EXEC 0x4
32#define PROT_GROWSDOWN 0x01000000
33#define PROT_GROWSUP 0x02000000
34#define PROT_NONE 0x0
35#define PROT_READ 0x1
36#define PROT_SEM 0x8
37#define PROT_WRITE 0x2
38#endif
diff --git a/tools/arch/powerpc/include/uapi/asm/mman.h b/tools/arch/powerpc/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..7a56ab9988dd
--- /dev/null
+++ b/tools/arch/powerpc/include/uapi/asm/mman.h
@@ -0,0 +1,13 @@
1#ifndef TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
3#define MAP_DENYWRITE 0x0800
4#define MAP_EXECUTABLE 0x1000
5#define MAP_GROWSDOWN 0x0100
6#define MAP_HUGETLB 0x40000
7#define MAP_LOCKED 0x80
8#define MAP_NONBLOCK 0x10000
9#define MAP_NORESERVE 0x40
10#define MAP_POPULATE 0x8000
11#define MAP_STACK 0x20000
12#include <uapi/asm-generic/mman-common.h>
13#endif
diff --git a/tools/arch/s390/include/uapi/asm/mman.h b/tools/arch/s390/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..fe53b91405d3
--- /dev/null
+++ b/tools/arch/s390/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/score/include/uapi/asm/mman.h b/tools/arch/score/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..ba1ee9ce9f6a
--- /dev/null
+++ b/tools/arch/score/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/sh/include/uapi/asm/mman.h b/tools/arch/sh/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..5a47d8cff786
--- /dev/null
+++ b/tools/arch/sh/include/uapi/asm/mman.h
@@ -0,0 +1,4 @@
1#ifndef TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
3#include <uapi/asm-generic/mman.h>
4#endif
diff --git a/tools/arch/sparc/include/uapi/asm/mman.h b/tools/arch/sparc/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..b88f3ac9c48a
--- /dev/null
+++ b/tools/arch/sparc/include/uapi/asm/mman.h
@@ -0,0 +1,13 @@
1#ifndef TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H
3#define MAP_DENYWRITE 0x0800
4#define MAP_EXECUTABLE 0x1000
5#define MAP_GROWSDOWN 0x0200
6#define MAP_HUGETLB 0x40000
7#define MAP_LOCKED 0x100
8#define MAP_NONBLOCK 0x10000
9#define MAP_NORESERVE 0x40
10#define MAP_POPULATE 0x8000
11#define MAP_STACK 0x20000
12#include <uapi/asm-generic/mman-common.h>
13#endif
diff --git a/tools/arch/tile/include/uapi/asm/mman.h b/tools/arch/tile/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..b0a054f27a22
--- /dev/null
+++ b/tools/arch/tile/include/uapi/asm/mman.h
@@ -0,0 +1,13 @@
1#ifndef TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H
3#define MAP_DENYWRITE 0x0800
4#define MAP_EXECUTABLE 0x1000
5#define MAP_GROWSDOWN 0x0100
6#define MAP_HUGETLB 0x4000
7#define MAP_LOCKED 0x0200
8#define MAP_NONBLOCK 0x0080
9#define MAP_NORESERVE 0x0400
10#define MAP_POPULATE 0x0040
11#define MAP_STACK MAP_GROWSDOWN
12#include <uapi/asm-generic/mman-common.h>
13#endif
diff --git a/tools/arch/x86/include/uapi/asm/mman.h b/tools/arch/x86/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..b73c1af8b1dd
--- /dev/null
+++ b/tools/arch/x86/include/uapi/asm/mman.h
@@ -0,0 +1,5 @@
1#ifndef TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H
3#define MAP_32BIT 0x40
4#include <uapi/asm-generic/mman.h>
5#endif
diff --git a/tools/arch/xtensa/include/uapi/asm/mman.h b/tools/arch/xtensa/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..1c89538bd391
--- /dev/null
+++ b/tools/arch/xtensa/include/uapi/asm/mman.h
@@ -0,0 +1,38 @@
1#ifndef TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H
2#define TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H
3#define MADV_DODUMP 17
4#define MADV_DOFORK 11
5#define MADV_DONTDUMP 16
6#define MADV_DONTFORK 10
7#define MADV_DONTNEED 4
8#define MADV_HUGEPAGE 14
9#define MADV_MERGEABLE 12
10#define MADV_NOHUGEPAGE 15
11#define MADV_NORMAL 0
12#define MADV_RANDOM 1
13#define MADV_REMOVE 9
14#define MADV_SEQUENTIAL 2
15#define MADV_UNMERGEABLE 13
16#define MADV_WILLNEED 3
17#define MAP_ANONYMOUS 0x0800
18#define MAP_DENYWRITE 0x2000
19#define MAP_EXECUTABLE 0x4000
20#define MAP_FILE 0
21#define MAP_FIXED 0x010
22#define MAP_GROWSDOWN 0x1000
23#define MAP_HUGETLB 0x80000
24#define MAP_LOCKED 0x8000
25#define MAP_NONBLOCK 0x20000
26#define MAP_NORESERVE 0x0400
27#define MAP_POPULATE 0x10000
28#define MAP_PRIVATE 0x002
29#define MAP_SHARED 0x001
30#define MAP_STACK 0x40000
31#define PROT_EXEC 0x4
32#define PROT_GROWSDOWN 0x01000000
33#define PROT_GROWSUP 0x02000000
34#define PROT_NONE 0x0
35#define PROT_READ 0x1
36#define PROT_SEM 0x10
37#define PROT_WRITE 0x2
38#endif
diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/uapi/asm-generic/mman-common.h
new file mode 100644
index 000000000000..58274382a616
--- /dev/null
+++ b/tools/include/uapi/asm-generic/mman-common.h
@@ -0,0 +1,75 @@
1#ifndef __ASM_GENERIC_MMAN_COMMON_H
2#define __ASM_GENERIC_MMAN_COMMON_H
3
4/*
5 Author: Michael S. Tsirkin <mst@mellanox.co.il>, Mellanox Technologies Ltd.
6 Based on: asm-xxx/mman.h
7*/
8
9#define PROT_READ 0x1 /* page can be read */
10#define PROT_WRITE 0x2 /* page can be written */
11#define PROT_EXEC 0x4 /* page can be executed */
12#define PROT_SEM 0x8 /* page may be used for atomic ops */
13#define PROT_NONE 0x0 /* page can not be accessed */
14#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
15#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
16
17#define MAP_SHARED 0x01 /* Share changes */
18#define MAP_PRIVATE 0x02 /* Changes are private */
19#define MAP_TYPE 0x0f /* Mask for type of mapping */
20#define MAP_FIXED 0x10 /* Interpret addr exactly */
21#define MAP_ANONYMOUS 0x20 /* don't use a file */
22#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
23# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */
24#else
25# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */
26#endif
27
28/*
29 * Flags for mlock
30 */
31#define MLOCK_ONFAULT 0x01 /* Lock pages in range after they are faulted in, do not prefault */
32
33#define MS_ASYNC 1 /* sync memory asynchronously */
34#define MS_INVALIDATE 2 /* invalidate the caches */
35#define MS_SYNC 4 /* synchronous memory sync */
36
37#define MADV_NORMAL 0 /* no further special treatment */
38#define MADV_RANDOM 1 /* expect random page references */
39#define MADV_SEQUENTIAL 2 /* expect sequential page references */
40#define MADV_WILLNEED 3 /* will need these pages */
41#define MADV_DONTNEED 4 /* don't need these pages */
42
43/* common parameters: try to keep these consistent across architectures */
44#define MADV_FREE 8 /* free pages only if memory pressure */
45#define MADV_REMOVE 9 /* remove these pages & resources */
46#define MADV_DONTFORK 10 /* don't inherit across fork */
47#define MADV_DOFORK 11 /* do inherit across fork */
48#define MADV_HWPOISON 100 /* poison a page for testing */
49#define MADV_SOFT_OFFLINE 101 /* soft offline page for testing */
50
51#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
52#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
53
54#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */
55#define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */
56
57#define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
58 overrides the coredump filter bits */
59#define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag */
60
61/* compatibility flags */
62#define MAP_FILE 0
63
64/*
65 * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size.
66 * This gives us 6 bits, which is enough until someone invents 128 bit address
67 * spaces.
68 *
69 * Assume these are all power of twos.
70 * When 0 use the default page size.
71 */
72#define MAP_HUGE_SHIFT 26
73#define MAP_HUGE_MASK 0x3f
74
75#endif /* __ASM_GENERIC_MMAN_COMMON_H */
diff --git a/tools/include/uapi/asm-generic/mman.h b/tools/include/uapi/asm-generic/mman.h
new file mode 100644
index 000000000000..10fa7857777f
--- /dev/null
+++ b/tools/include/uapi/asm-generic/mman.h
@@ -0,0 +1,22 @@
1#ifndef __ASM_GENERIC_MMAN_H
2#define __ASM_GENERIC_MMAN_H
3
4#include <uapi/asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
14#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
15
16/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */
17
18#define MCL_CURRENT 1 /* lock all current mappings */
19#define MCL_FUTURE 2 /* lock all future mappings */
20#define MCL_ONFAULT 4 /* lock all pages that are faulted in */
21
22#endif /* __ASM_GENERIC_MMAN_H */
diff --git a/tools/include/uapi/linux/mman.h b/tools/include/uapi/linux/mman.h
new file mode 100644
index 000000000000..81d8edf11789
--- /dev/null
+++ b/tools/include/uapi/linux/mman.h
@@ -0,0 +1,13 @@
1#ifndef _UAPI_LINUX_MMAN_H
2#define _UAPI_LINUX_MMAN_H
3
4#include <uapi/asm/mman.h>
5
6#define MREMAP_MAYMOVE 1
7#define MREMAP_FIXED 2
8
9#define OVERCOMMIT_GUESS 0
10#define OVERCOMMIT_ALWAYS 1
11#define OVERCOMMIT_NEVER 2
12
13#endif /* _UAPI_LINUX_MMAN_H */
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index ff200c6cb790..0bda2cca2b3a 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -66,9 +66,12 @@ tools/include/linux/hash.h
66tools/include/linux/kernel.h 66tools/include/linux/kernel.h
67tools/include/linux/list.h 67tools/include/linux/list.h
68tools/include/linux/log2.h 68tools/include/linux/log2.h
69tools/include/uapi/asm-generic/mman-common.h
70tools/include/uapi/asm-generic/mman.h
69tools/include/uapi/linux/bpf.h 71tools/include/uapi/linux/bpf.h
70tools/include/uapi/linux/bpf_common.h 72tools/include/uapi/linux/bpf_common.h
71tools/include/uapi/linux/hw_breakpoint.h 73tools/include/uapi/linux/hw_breakpoint.h
74tools/include/uapi/linux/mman.h
72tools/include/uapi/linux/perf_event.h 75tools/include/uapi/linux/perf_event.h
73tools/include/linux/poison.h 76tools/include/linux/poison.h
74tools/include/linux/rbtree.h 77tools/include/linux/rbtree.h
@@ -79,4 +82,5 @@ tools/include/linux/types.h
79tools/include/linux/err.h 82tools/include/linux/err.h
80tools/include/linux/bitmap.h 83tools/include/linux/bitmap.h
81tools/include/linux/time64.h 84tools/include/linux/time64.h
85tools/arch/*/include/uapi/asm/mman.h
82tools/arch/*/include/uapi/asm/perf_regs.h 86tools/arch/*/include/uapi/asm/perf_regs.h