Skip to content

Commit 10b9baa

Browse files
committed
tools arch s390: Do not include header files from the kernel sources
Long ago we decided to be verbotten including files in the kernel git sources from tools/ living source code, to avoid disturbing kernel development (and perf's and other tools/) when, say, a kernel hacker adds something, tests everything but tools/ and have tools/ build broken. This got broken recently by s/390, fix it by copying arch/s390/include/uapi/asm/perf_regs.h to tools/arch/s390/include/uapi/asm/, making this one be used by means of <asm/perf_regs.h> and updating tools/perf/check_headers.sh to make sure we are notified when the original changes, so that we can check if anything is needed on the tooling side. This would have been caught by the 'tarkpg' test entry in: $ make -C tools/perf build-test When run on a s/390 build system or container. Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: Thomas Richter <tmricht@linux.vnet.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Fixes: f704ef4 ("s390/perf: add support for perf_regs and libdw") Link: https://lkml.kernel.org/n/tip-n57139ic0v9uffx8wdqi3d8a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent ca58d7e commit 10b9baa

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
#ifndef _ASM_S390_PERF_REGS_H
3+
#define _ASM_S390_PERF_REGS_H
4+
5+
enum perf_event_s390_regs {
6+
PERF_REG_S390_R0,
7+
PERF_REG_S390_R1,
8+
PERF_REG_S390_R2,
9+
PERF_REG_S390_R3,
10+
PERF_REG_S390_R4,
11+
PERF_REG_S390_R5,
12+
PERF_REG_S390_R6,
13+
PERF_REG_S390_R7,
14+
PERF_REG_S390_R8,
15+
PERF_REG_S390_R9,
16+
PERF_REG_S390_R10,
17+
PERF_REG_S390_R11,
18+
PERF_REG_S390_R12,
19+
PERF_REG_S390_R13,
20+
PERF_REG_S390_R14,
21+
PERF_REG_S390_R15,
22+
PERF_REG_S390_FP0,
23+
PERF_REG_S390_FP1,
24+
PERF_REG_S390_FP2,
25+
PERF_REG_S390_FP3,
26+
PERF_REG_S390_FP4,
27+
PERF_REG_S390_FP5,
28+
PERF_REG_S390_FP6,
29+
PERF_REG_S390_FP7,
30+
PERF_REG_S390_FP8,
31+
PERF_REG_S390_FP9,
32+
PERF_REG_S390_FP10,
33+
PERF_REG_S390_FP11,
34+
PERF_REG_S390_FP12,
35+
PERF_REG_S390_FP13,
36+
PERF_REG_S390_FP14,
37+
PERF_REG_S390_FP15,
38+
PERF_REG_S390_MASK,
39+
PERF_REG_S390_PC,
40+
41+
PERF_REG_S390_MAX
42+
};
43+
44+
#endif /* _ASM_S390_PERF_REGS_H */

tools/perf/arch/s390/include/perf_regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <stdlib.h>
55
#include <linux/types.h>
6-
#include <../../../../arch/s390/include/uapi/asm/perf_regs.h>
6+
#include <asm/perf_regs.h>
77

88
void perf_regs_load(u64 *regs);
99

tools/perf/check-headers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ arch/x86/include/asm/cpufeatures.h
2121
arch/arm/include/uapi/asm/perf_regs.h
2222
arch/arm64/include/uapi/asm/perf_regs.h
2323
arch/powerpc/include/uapi/asm/perf_regs.h
24+
arch/s390/include/uapi/asm/perf_regs.h
2425
arch/x86/include/uapi/asm/perf_regs.h
2526
arch/x86/include/uapi/asm/kvm.h
2627
arch/x86/include/uapi/asm/kvm_perf.h

0 commit comments

Comments
 (0)