Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481237 > unrolled thread
| Started by | Wang Nan <wangnan0@huawei.com> |
|---|---|
| First post | 2016-09-12 15:00 +0200 |
| Last post | 2016-09-12 15:00 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/3] perf: Fix mmap related macros Wang Nan <wangnan0@huawei.com> - 2016-09-12 15:00 +0200
[PATCH 2/3] tools include: Introduce bits/mman.h Wang Nan <wangnan0@huawei.com> - 2016-09-12 15:00 +0200
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-09-12 15:00 +0200 |
| Subject | [PATCH 0/3] perf: Fix mmap related macros |
| Message-ID | <sgz05-3qM-5@gated-at.bofh.it> |
Some macros have different value for different archs. For example: $ grep '#define MAP_HUGETLB' ./arch/*/include/ ./include/ -r ./arch/alpha/include/uapi/asm/mman.h:#define MAP_HUGETLB 0x100000 ./arch/mips/include/uapi/asm/mman.h:#define MAP_HUGETLB 0x80000 ./arch/parisc/include/uapi/asm/mman.h:#define MAP_HUGETLB 0x80000 ./arch/powerpc/include/uapi/asm/mman.h:#define MAP_HUGETLB 0x40000 ./arch/sparc/include/uapi/asm/mman.h:#define MAP_HUGETLB 0x40000 ./arch/tile/include/uapi/asm/mman.h:#define MAP_HUGETLB 0x4000 ./arch/xtensa/include/uapi/asm/mman.h:#define MAP_HUGETLB 0x80000 ./include/uapi/asm-generic/mman.h:#define MAP_HUGETLB 0x40000 Current tools/perf/trace/beauty/mmap.c works for x86 only. This patchset clone required macros from kernel source tree to tools/. By replacing bits/mman.h, #include <sys/mman.h> automatically use correct macros. Wang Nan (3): tools include: Add uapi mman.h for each architecture tools include: Introduce bits/mman.h perf build: Compare mman.h related headers againest kernel tools/arch/alpha/include/uapi/asm/mman.h | 38 ++++++++++++++ tools/arch/arm/include/uapi/asm/mman.h | 4 ++ tools/arch/arm64/include/uapi/asm/mman.h | 4 ++ tools/arch/frv/include/uapi/asm/mman.h | 4 ++ tools/arch/h8300/include/uapi/asm/mman.h | 4 ++ tools/arch/hexagon/include/uapi/asm/mman.h | 4 ++ tools/arch/ia64/include/uapi/asm/mman.h | 4 ++ tools/arch/m32r/include/uapi/asm/mman.h | 4 ++ tools/arch/microblaze/include/uapi/asm/mman.h | 4 ++ tools/arch/mips/include/uapi/asm/mman.h | 39 ++++++++++++++ tools/arch/mn10300/include/uapi/asm/mman.h | 4 ++ tools/arch/parisc/include/uapi/asm/mman.h | 38 ++++++++++++++ tools/arch/powerpc/include/uapi/asm/mman.h | 13 +++++ tools/arch/s390/include/uapi/asm/mman.h | 4 ++ tools/arch/score/include/uapi/asm/mman.h | 4 ++ tools/arch/sh/include/uapi/asm/mman.h | 4 ++ tools/arch/sparc/include/uapi/asm/mman.h | 13 +++++ tools/arch/tile/include/uapi/asm/mman.h | 13 +++++ tools/arch/x86/include/uapi/asm/mman.h | 5 ++ tools/arch/xtensa/include/uapi/asm/mman.h | 38 ++++++++++++++ tools/include/bits/mman.h | 6 +++ tools/include/uapi/asm-generic/mman-common.h | 75 +++++++++++++++++++++++++++ tools/include/uapi/asm-generic/mman.h | 22 ++++++++ tools/include/uapi/linux/mman.h | 13 +++++ tools/perf/Makefile.perf | 9 ++++ 25 files changed, 370 insertions(+) create mode 100644 tools/arch/alpha/include/uapi/asm/mman.h create mode 100644 tools/arch/arm/include/uapi/asm/mman.h create mode 100644 tools/arch/arm64/include/uapi/asm/mman.h create mode 100644 tools/arch/frv/include/uapi/asm/mman.h create mode 100644 tools/arch/h8300/include/uapi/asm/mman.h create mode 100644 tools/arch/hexagon/include/uapi/asm/mman.h create mode 100644 tools/arch/ia64/include/uapi/asm/mman.h create mode 100644 tools/arch/m32r/include/uapi/asm/mman.h create mode 100644 tools/arch/microblaze/include/uapi/asm/mman.h create mode 100644 tools/arch/mips/include/uapi/asm/mman.h create mode 100644 tools/arch/mn10300/include/uapi/asm/mman.h create mode 100644 tools/arch/parisc/include/uapi/asm/mman.h create mode 100644 tools/arch/powerpc/include/uapi/asm/mman.h create mode 100644 tools/arch/s390/include/uapi/asm/mman.h create mode 100644 tools/arch/score/include/uapi/asm/mman.h create mode 100644 tools/arch/sh/include/uapi/asm/mman.h create mode 100644 tools/arch/sparc/include/uapi/asm/mman.h create mode 100644 tools/arch/tile/include/uapi/asm/mman.h create mode 100644 tools/arch/x86/include/uapi/asm/mman.h create mode 100644 tools/arch/xtensa/include/uapi/asm/mman.h create mode 100644 tools/include/bits/mman.h create mode 100644 tools/include/uapi/asm-generic/mman-common.h create mode 100644 tools/include/uapi/asm-generic/mman.h create mode 100644 tools/include/uapi/linux/mman.h -- 1.8.3.4
[toc] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-09-12 15:00 +0200 |
| Subject | [PATCH 2/3] tools include: Introduce bits/mman.h |
| Message-ID | <sgz06-3qM-29@gated-at.bofh.it> |
| In reply to | #1481237 |
Makes '#include <sys/mman.h>' automatically uses macros defined in uapi/asm for each architecture. At least for glibc, <sys/mman.h> includes <bits/mman.h> for mmap macros. This patch replaces bits/mman.h, makes it use headers in uapi. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> --- tools/include/bits/mman.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tools/include/bits/mman.h diff --git a/tools/include/bits/mman.h b/tools/include/bits/mman.h new file mode 100644 index 0000000..9be2717 --- /dev/null +++ b/tools/include/bits/mman.h @@ -0,0 +1,6 @@ +#ifndef TOOLS_INCLUDE_BITS_MMAN_H +#define TOOLS_INCLUDE_BITS_MMAN_H + +#include <linux/mman.h> + +#endif -- 1.8.3.4
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web