diff options
author | Wang Nan <wangnan0@huawei.com> | 2016-09-12 12:54:29 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-09-13 15:26:08 -0300 |
commit | f3539c12d8196ce0a1993364d30b3a18908470d1 (patch) | |
tree | 418e70748c740f8693ef6255f2611785a175c7fb /tools/perf/MANIFEST | |
parent | d9ea48bc4e7cc297ca1073fa3f90ed80d964b7b4 (diff) | |
download | linux-f3539c12d8196ce0a1993364d30b3a18908470d1.tar.bz2 |
tools include: Add uapi mman.h for each architecture
Some mmap related macros have different values for different
architectures. This patch introduces uapi mman.h for each
architectures.
Three headers are cloned from kernel include to tools/include:
tools/include/uapi/asm-generic/mman-common.h
tools/include/uapi/asm-generic/mman.h
tools/include/uapi/linux/mman.h
The main part of this patch is generated by following script:
macros=`cat $0 | awk 'V==1 {print}; /^# start macro list/ {V=1}'`
for arch in `ls tools/arch`
do
[ -d tools/arch/$arch/include/uapi/asm ] || mkdir -p tools/arch/$arch/include/uapi/asm
src=arch/$arch/include/uapi/asm/mman.h
target=tools/arch/$arch/include/uapi/asm/mman.h
guard="TOOLS_ARCH_"`echo $arch | awk '{print toupper($0)}'`_UAPI_ASM_MMAN_FIX_H
echo '#ifndef '$guard > $target
echo '#define '$guard >> $target
[ -f $src ] &&
for m in $macros
do
if grep '#define[ \t]*'$m $src > /dev/null 2>&1
then
grep -h '#define[ \t]*'$m $src | sed 's/[ \t]*\/\*.*$//g' >> $target
fi
done
if [ -f $src ]
then
grep '#include <asm-generic' $src >> $target
else
echo "#include <asm-generic/mman.h>" >> $target
fi
echo '#endif' >> $target
echo "$target"
done
exit 0
# Following macros are extracted from:
# tools/perf/trace/beauty/mmap.c
#
# start macro list
MADV_DODUMP
MADV_DOFORK
MADV_DONTDUMP
MADV_DONTFORK
MADV_DONTNEED
MADV_HUGEPAGE
MADV_HWPOISON
MADV_MERGEABLE
MADV_NOHUGEPAGE
MADV_NORMAL
MADV_RANDOM
MADV_REMOVE
MADV_SEQUENTIAL
MADV_SOFT_OFFLINE
MADV_UNMERGEABLE
MADV_WILLNEED
MAP_32BIT
MAP_ANONYMOUS
MAP_DENYWRITE
MAP_EXECUTABLE
MAP_FILE
MAP_FIXED
MAP_GROWSDOWN
MAP_HUGETLB
MAP_LOCKED
MAP_NONBLOCK
MAP_NORESERVE
MAP_POPULATE
MAP_PRIVATE
MAP_SHARED
MAP_STACK
MAP_UNINITIALIZED
MREMAP_FIXED
MREMAP_MAYMOVE
PROT_EXEC
PROT_GROWSDOWN
PROT_GROWSUP
PROT_NONE
PROT_READ
PROT_SEM
PROT_WRITE
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1473684871-209320-2-git-send-email-wangnan0@huawei.com
[ Added new files to tools/perf/MANIFEST to fix the detached tarball build, add mman.h for ARC ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/MANIFEST')
-rw-r--r-- | tools/perf/MANIFEST | 4 |
1 files changed, 4 insertions, 0 deletions
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 tools/include/linux/kernel.h tools/include/linux/list.h tools/include/linux/log2.h +tools/include/uapi/asm-generic/mman-common.h +tools/include/uapi/asm-generic/mman.h tools/include/uapi/linux/bpf.h tools/include/uapi/linux/bpf_common.h tools/include/uapi/linux/hw_breakpoint.h +tools/include/uapi/linux/mman.h tools/include/uapi/linux/perf_event.h tools/include/linux/poison.h tools/include/linux/rbtree.h @@ -79,4 +82,5 @@ tools/include/linux/types.h tools/include/linux/err.h tools/include/linux/bitmap.h tools/include/linux/time64.h +tools/arch/*/include/uapi/asm/mman.h tools/arch/*/include/uapi/asm/perf_regs.h |