Skip to content

Commit 1b3b521

Browse files
committed
tools headers: Syncronize mman.h ABI header
To add support for the MAP_SYNC flag introduced in: b6fb293 ("mm: Define MAP_SYNC and VM_SYNC flags") Update tools/perf/trace/beauty/mmap.c to support that flag. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman.h' differs from latest version at 'include/uapi/asm-generic/mman.h' Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jan Kara <jack@suse.cz> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-14zyk3iywrj37c7g1eagmzbo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent d9744f9 commit 1b3b521

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tools/include/uapi/asm-generic/mman.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
1414
#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
1515
#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
16+
#define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */
1617

1718
/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */
1819

tools/perf/trace/beauty/mmap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size,
6262
P_MMAP_FLAG(POPULATE);
6363
P_MMAP_FLAG(STACK);
6464
P_MMAP_FLAG(UNINITIALIZED);
65+
#ifdef MAP_SYNC
66+
P_MMAP_FLAG(SYNC);
67+
#endif
6568
#undef P_MMAP_FLAG
6669

6770
if (flags)

0 commit comments

Comments
 (0)