diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-26 12:49:00 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 09:02:58 -0300 |
commit | b830f94f7303a49d509d5b1bb34ecb2e648b23c4 (patch) | |
tree | 90de8d1a51504c54b07f6594564c7cb6c4f63e69 /tools/include | |
parent | e0d99c4d24fd8861da724b88ebd18a9fae8a2260 (diff) | |
download | linux-b830f94f7303a49d509d5b1bb34ecb2e648b23c4.tar.bz2 |
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>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/uapi/asm-generic/mman-common.h | 15 | ||||
-rw-r--r-- | tools/include/uapi/asm-generic/mman.h | 10 |
2 files changed, 13 insertions, 12 deletions
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 @@ #define MAP_TYPE 0x0f /* Mask for type of mapping */ #define MAP_FIXED 0x10 /* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20 /* don't use a file */ -#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED -# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */ -#else -# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ -#endif -/* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */ +/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ +#define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */ +#define MAP_NONBLOCK 0x010000 /* do not block on IO */ +#define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */ +#define MAP_HUGETLB 0x040000 /* create a huge page mapping */ +#define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */ #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ +#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be + * uninitialized */ + /* * Flags for mlock */ 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 @@ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ #define MAP_LOCKED 0x2000 /* pages are locked */ #define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x10000 /* do not block on IO */ -#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ -#define MAP_HUGETLB 0x40000 /* create a huge page mapping */ -#define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */ -/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ +/* + * Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h + * for MAP_HUGETLB usage + */ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ |