diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-26 11:49:00 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 08:02:58 -0400 |
commit | b830f94f7303a49d509d5b1bb34ecb2e648b23c4 (patch) | |
tree | 90de8d1a51504c54b07f6594564c7cb6c4f63e69 | |
parent | e0d99c4d24fd8861da724b88ebd18a9fae8a2260 (diff) |
tools headers UAPI: Update tools's copy of mman.h headers
To pick up the changes from:
8aa3c927ec10 ("mm/mmap: move common defines to mman-common.h")
22fcea6f85f2 ("mm: move MAP_SYNC to asm-generic/mman-common.h")
0bf5f9492389 ("mm: fix the MAP_UNINITIALIZED flag")
To address the following perf build warnings:
Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h'
diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h
Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman.h' differs from latest version at 'include/uapi/asm-generic/mman.h'
diff -u tools/include/uapi/asm-generic/mman.h include/uapi/asm-generic/mman.h
That ends up just moving a bit the auto-generated code->string tables:
$ tools/perf/trace/beauty/mmap_flags.sh > before
$ cp include/uapi/asm-generic/mman.h tools/include/uapi/asm-generic/mman.h
$ cp include/uapi/asm-generic/mman-common.h tools/include/uapi/asm-generic/mman-common.h
$ tools/perf/trace/beauty/mmap_flags.sh > after
$ diff -u before after
--- before 2019-07-26 12:45:02.948335904 -0300
+++ after 2019-07-26 12:48:05.342893539 -0300
@@ -4,15 +4,15 @@
[ilog2(0x02) + 1] = "PRIVATE",
[ilog2(0x10) + 1] = "FIXED",
[ilog2(0x20) + 1] = "ANONYMOUS",
+ [ilog2(0x008000) + 1] = "POPULATE",
+ [ilog2(0x010000) + 1] = "NONBLOCK",
+ [ilog2(0x020000) + 1] = "STACK",
+ [ilog2(0x040000) + 1] = "HUGETLB",
+ [ilog2(0x080000) + 1] = "SYNC",
[ilog2(0x100000) + 1] = "FIXED_NOREPLACE",
[ilog2(0x0100) + 1] = "GROWSDOWN",
[ilog2(0x0800) + 1] = "DENYWRITE",
[ilog2(0x1000) + 1] = "EXECUTABLE",
[ilog2(0x2000) + 1] = "LOCKED",
[ilog2(0x4000) + 1] = "NORESERVE",
- [ilog2(0x8000) + 1] = "POPULATE",
- [ilog2(0x10000) + 1] = "NONBLOCK",
- [ilog2(0x20000) + 1] = "STACK",
- [ilog2(0x40000) + 1] = "HUGETLB",
- [ilog2(0x80000) + 1] = "SYNC",
};
$
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-fzqvzni9megaurmsp0k4vy27@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/arch/powerpc/include/uapi/asm/mman.h | 4 | ||||
-rw-r--r-- | tools/arch/sparc/include/uapi/asm/mman.h | 4 | ||||
-rw-r--r-- | tools/include/uapi/asm-generic/mman-common.h | 15 | ||||
-rw-r--r-- | tools/include/uapi/asm-generic/mman.h | 10 |
4 files changed, 13 insertions, 20 deletions
diff --git a/tools/arch/powerpc/include/uapi/asm/mman.h b/tools/arch/powerpc/include/uapi/asm/mman.h index f33105bc5ca6..8601d824a9c6 100644 --- a/tools/arch/powerpc/include/uapi/asm/mman.h +++ b/tools/arch/powerpc/include/uapi/asm/mman.h | |||
@@ -4,12 +4,8 @@ | |||
4 | #define MAP_DENYWRITE 0x0800 | 4 | #define MAP_DENYWRITE 0x0800 |
5 | #define MAP_EXECUTABLE 0x1000 | 5 | #define MAP_EXECUTABLE 0x1000 |
6 | #define MAP_GROWSDOWN 0x0100 | 6 | #define MAP_GROWSDOWN 0x0100 |
7 | #define MAP_HUGETLB 0x40000 | ||
8 | #define MAP_LOCKED 0x80 | 7 | #define MAP_LOCKED 0x80 |
9 | #define MAP_NONBLOCK 0x10000 | ||
10 | #define MAP_NORESERVE 0x40 | 8 | #define MAP_NORESERVE 0x40 |
11 | #define MAP_POPULATE 0x8000 | ||
12 | #define MAP_STACK 0x20000 | ||
13 | #include <uapi/asm-generic/mman-common.h> | 9 | #include <uapi/asm-generic/mman-common.h> |
14 | /* MAP_32BIT is undefined on powerpc, fix it for perf */ | 10 | /* MAP_32BIT is undefined on powerpc, fix it for perf */ |
15 | #define MAP_32BIT 0 | 11 | #define MAP_32BIT 0 |
diff --git a/tools/arch/sparc/include/uapi/asm/mman.h b/tools/arch/sparc/include/uapi/asm/mman.h index 38920eed8cbf..7b94dccc843d 100644 --- a/tools/arch/sparc/include/uapi/asm/mman.h +++ b/tools/arch/sparc/include/uapi/asm/mman.h | |||
@@ -4,12 +4,8 @@ | |||
4 | #define MAP_DENYWRITE 0x0800 | 4 | #define MAP_DENYWRITE 0x0800 |
5 | #define MAP_EXECUTABLE 0x1000 | 5 | #define MAP_EXECUTABLE 0x1000 |
6 | #define MAP_GROWSDOWN 0x0200 | 6 | #define MAP_GROWSDOWN 0x0200 |
7 | #define MAP_HUGETLB 0x40000 | ||
8 | #define MAP_LOCKED 0x100 | 7 | #define MAP_LOCKED 0x100 |
9 | #define MAP_NONBLOCK 0x10000 | ||
10 | #define MAP_NORESERVE 0x40 | 8 | #define MAP_NORESERVE 0x40 |
11 | #define MAP_POPULATE 0x8000 | ||
12 | #define MAP_STACK 0x20000 | ||
13 | #include <uapi/asm-generic/mman-common.h> | 9 | #include <uapi/asm-generic/mman-common.h> |
14 | /* MAP_32BIT is undefined on sparc, fix it for perf */ | 10 | /* MAP_32BIT is undefined on sparc, fix it for perf */ |
15 | #define MAP_32BIT 0 | 11 | #define MAP_32BIT 0 |
diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/uapi/asm-generic/mman-common.h index abd238d0f7a4..63b1f506ea67 100644 --- a/tools/include/uapi/asm-generic/mman-common.h +++ b/tools/include/uapi/asm-generic/mman-common.h | |||
@@ -19,15 +19,18 @@ | |||
19 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | 19 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ |
20 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | 20 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ |
21 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | 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 | 22 | ||
28 | /* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */ | 23 | /* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ |
24 | #define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */ | ||
25 | #define MAP_NONBLOCK 0x010000 /* do not block on IO */ | ||
26 | #define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */ | ||
27 | #define MAP_HUGETLB 0x040000 /* create a huge page mapping */ | ||
28 | #define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */ | ||
29 | #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ | 29 | #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ |
30 | 30 | ||
31 | #define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be | ||
32 | * uninitialized */ | ||
33 | |||
31 | /* | 34 | /* |
32 | * Flags for mlock | 35 | * Flags for mlock |
33 | */ | 36 | */ |
diff --git a/tools/include/uapi/asm-generic/mman.h b/tools/include/uapi/asm-generic/mman.h index 36c197fc44a0..406f7718f9ad 100644 --- a/tools/include/uapi/asm-generic/mman.h +++ b/tools/include/uapi/asm-generic/mman.h | |||
@@ -9,13 +9,11 @@ | |||
9 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 9 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
10 | #define MAP_LOCKED 0x2000 /* pages are locked */ | 10 | #define MAP_LOCKED 0x2000 /* pages are locked */ |
11 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | 11 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ |
12 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
13 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
14 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
15 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
16 | #define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */ | ||
17 | 12 | ||
18 | /* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ | 13 | /* |
14 | * Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h | ||
15 | * for MAP_HUGETLB usage | ||
16 | */ | ||
19 | 17 | ||
20 | #define MCL_CURRENT 1 /* lock all current mappings */ | 18 | #define MCL_CURRENT 1 /* lock all current mappings */ |
21 | #define MCL_FUTURE 2 /* lock all future mappings */ | 19 | #define MCL_FUTURE 2 /* lock all future mappings */ |