From 789dc821620a53ff7605747dda464032301f5def Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 14 Apr 2020 09:04:53 -0300 Subject: [PATCH] UPSTREAM: tools headers UAPI: Sync linux/mman.h with the kernel To get the changes in: e346b3813067 ("mm/mremap: add MREMAP_DONTUNMAP to mremap()") Add that to 'perf trace's mremap 'flags' decoder. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h' diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Brian Geffon Signed-off-by: Arnaldo Carvalho de Melo (cherry picked from commit f60b3878f47311a61fe2d4c5ef77c52e31554c52) Bug: 176847609 Signed-off-by: Kalesh Singh Change-Id: Iab7117411cf9c4c32356da2b3de598a0df299a7c --- tools/include/uapi/linux/mman.h | 5 +++-- tools/perf/trace/beauty/mmap.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/include/uapi/linux/mman.h b/tools/include/uapi/linux/mman.h index bfd5938fede6..467dcfcba58b 100755 --- a/tools/include/uapi/linux/mman.h +++ b/tools/include/uapi/linux/mman.h @@ -5,8 +5,9 @@ #include #include -#define MREMAP_MAYMOVE 1 -#define MREMAP_FIXED 2 +#define MREMAP_MAYMOVE 1 +#define MREMAP_FIXED 2 +#define MREMAP_DONTUNMAP 4 #define OVERCOMMIT_GUESS 0 #define OVERCOMMIT_ALWAYS 1 diff --git a/tools/perf/trace/beauty/mmap.c b/tools/perf/trace/beauty/mmap.c index 51f1cea406f5..91b88fd9617c 100755 --- a/tools/perf/trace/beauty/mmap.c +++ b/tools/perf/trace/beauty/mmap.c @@ -85,6 +85,7 @@ static size_t syscall_arg__scnprintf_mremap_flags(char *bf, size_t size, P_MREMAP_FLAG(MAYMOVE); P_MREMAP_FLAG(FIXED); + P_MREMAP_FLAG(DONTUNMAP); #undef P_MREMAP_FLAG if (flags)