]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
a2bd1760616c48e2ab921ac0bd1ef5d400aa5e87
[thirdparty/kernel/stable-queue.git] /
1 From cec07f53c398f22576df77052c4777dc13f14962 Mon Sep 17 00:00:00 2001
2 From: Arnaldo Carvalho de Melo <acme@redhat.com>
3 Date: Thu, 7 Jul 2016 18:28:43 -0300
4 Subject: perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/
5
6 From: Arnaldo Carvalho de Melo <acme@redhat.com>
7
8 commit cec07f53c398f22576df77052c4777dc13f14962 upstream.
9
10 And remove the empty tools/arch/x86/include/asm/unistd_{32,64}.h files
11 introduced by eae7a755ee81 ("perf tools, x86: Build perf on older
12 user-space as well").
13
14 This way we get closer to mirroring the kernel for cases where __NR_
15 can't be found for some include path/_GNU_SOURCE/whatever scenario.
16
17 Cc: Adrian Hunter <adrian.hunter@intel.com>
18 Cc: David Ahern <dsahern@gmail.com>
19 Cc: Jiri Olsa <jolsa@kernel.org>
20 Cc: Namhyung Kim <namhyung@kernel.org>
21 Cc: Wang Nan <wangnan0@huawei.com>
22 Link: http://lkml.kernel.org/n/tip-kpj6m3mbjw82kg6krk2z529e@git.kernel.org
23 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
24 Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27 ---
28 tools/arch/x86/include/asm/unistd_32.h | 9 +++++++++
29 tools/arch/x86/include/asm/unistd_64.h | 9 +++++++++
30 tools/perf/config/Makefile | 1 +
31 tools/perf/perf-sys.h | 18 ------------------
32 tools/perf/util/include/asm/unistd_32.h | 1 -
33 tools/perf/util/include/asm/unistd_64.h | 1 -
34 6 files changed, 19 insertions(+), 20 deletions(-)
35
36 --- /dev/null
37 +++ b/tools/arch/x86/include/asm/unistd_32.h
38 @@ -0,0 +1,9 @@
39 +#ifndef __NR_perf_event_open
40 +# define __NR_perf_event_open 336
41 +#endif
42 +#ifndef __NR_futex
43 +# define __NR_futex 240
44 +#endif
45 +#ifndef __NR_gettid
46 +# define __NR_gettid 224
47 +#endif
48 --- /dev/null
49 +++ b/tools/arch/x86/include/asm/unistd_64.h
50 @@ -0,0 +1,9 @@
51 +#ifndef __NR_perf_event_open
52 +# define __NR_perf_event_open 298
53 +#endif
54 +#ifndef __NR_futex
55 +# define __NR_futex 202
56 +#endif
57 +#ifndef __NR_gettid
58 +# define __NR_gettid 186
59 +#endif
60 --- a/tools/perf/config/Makefile
61 +++ b/tools/perf/config/Makefile
62 @@ -200,6 +200,7 @@ CFLAGS += -I$(src-perf)/arch/$(ARCH)/inc
63 CFLAGS += -I$(srctree)/tools/include/
64 CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi
65 CFLAGS += -I$(srctree)/arch/$(ARCH)/include
66 +CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/include
67 CFLAGS += -I$(srctree)/include/uapi
68 CFLAGS += -I$(srctree)/include
69
70 --- a/tools/perf/perf-sys.h
71 +++ b/tools/perf/perf-sys.h
72 @@ -11,29 +11,11 @@
73 #if defined(__i386__)
74 #define cpu_relax() asm volatile("rep; nop" ::: "memory");
75 #define CPUINFO_PROC {"model name"}
76 -#ifndef __NR_perf_event_open
77 -# define __NR_perf_event_open 336
78 -#endif
79 -#ifndef __NR_futex
80 -# define __NR_futex 240
81 -#endif
82 -#ifndef __NR_gettid
83 -# define __NR_gettid 224
84 -#endif
85 #endif
86
87 #if defined(__x86_64__)
88 #define cpu_relax() asm volatile("rep; nop" ::: "memory");
89 #define CPUINFO_PROC {"model name"}
90 -#ifndef __NR_perf_event_open
91 -# define __NR_perf_event_open 298
92 -#endif
93 -#ifndef __NR_futex
94 -# define __NR_futex 202
95 -#endif
96 -#ifndef __NR_gettid
97 -# define __NR_gettid 186
98 -#endif
99 #endif
100
101 #ifdef __powerpc__
102 --- a/tools/perf/util/include/asm/unistd_32.h
103 +++ /dev/null
104 @@ -1 +0,0 @@
105 -
106 --- a/tools/perf/util/include/asm/unistd_64.h
107 +++ /dev/null
108 @@ -1 +0,0 @@
109 -