Skip to content

Commit 6c1ced2

Browse files
seehearfeelacmel
authored andcommitted
perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS
To allow the build to complete on older systems, where those files are either not uptodate, lacking some recent additions or not present at all. And check if the copy drifts from the kernel. This commit is similar with commit 12f0203 ("tools: Copy uapi/asm/perf_regs.h from the kernel") With this commit, we can avoid the following build error in any case: tools/perf/arch/mips/include/perf_regs.h:7:10: fatal error: asm/perf_regs.h: No such file or directory #include <asm/perf_regs.h> ^~~~~~~~~~~~~~~~~ compilation terminated. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Xuefeng Li <lixuefeng@loongson.cn> Link: http://lore.kernel.org/lkml/1622548436-12472-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent c2131f7 commit 6c1ced2

3 files changed

Lines changed: 41 additions & 1 deletion

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
#ifndef _ASM_MIPS_PERF_REGS_H
3+
#define _ASM_MIPS_PERF_REGS_H
4+
5+
enum perf_event_mips_regs {
6+
PERF_REG_MIPS_PC,
7+
PERF_REG_MIPS_R1,
8+
PERF_REG_MIPS_R2,
9+
PERF_REG_MIPS_R3,
10+
PERF_REG_MIPS_R4,
11+
PERF_REG_MIPS_R5,
12+
PERF_REG_MIPS_R6,
13+
PERF_REG_MIPS_R7,
14+
PERF_REG_MIPS_R8,
15+
PERF_REG_MIPS_R9,
16+
PERF_REG_MIPS_R10,
17+
PERF_REG_MIPS_R11,
18+
PERF_REG_MIPS_R12,
19+
PERF_REG_MIPS_R13,
20+
PERF_REG_MIPS_R14,
21+
PERF_REG_MIPS_R15,
22+
PERF_REG_MIPS_R16,
23+
PERF_REG_MIPS_R17,
24+
PERF_REG_MIPS_R18,
25+
PERF_REG_MIPS_R19,
26+
PERF_REG_MIPS_R20,
27+
PERF_REG_MIPS_R21,
28+
PERF_REG_MIPS_R22,
29+
PERF_REG_MIPS_R23,
30+
PERF_REG_MIPS_R24,
31+
PERF_REG_MIPS_R25,
32+
PERF_REG_MIPS_R26,
33+
PERF_REG_MIPS_R27,
34+
PERF_REG_MIPS_R28,
35+
PERF_REG_MIPS_R29,
36+
PERF_REG_MIPS_R30,
37+
PERF_REG_MIPS_R31,
38+
PERF_REG_MIPS_MAX = PERF_REG_MIPS_R31 + 1,
39+
};
40+
#endif /* _ASM_MIPS_PERF_REGS_H */

tools/perf/Makefile.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ endif
9090
ifeq ($(ARCH),mips)
9191
NO_PERF_REGS := 0
9292
CFLAGS += -I$(OUTPUT)arch/mips/include/generated
93-
CFLAGS += -I../../arch/mips/include/uapi -I../../arch/mips/include/generated/uapi
9493
LIBUNWIND_LIBS = -lunwind -lunwind-mips
9594
endif
9695

tools/perf/check-headers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ arch/x86/lib/x86-opcode-map.txt
3939
arch/x86/tools/gen-insn-attr-x86.awk
4040
arch/arm/include/uapi/asm/perf_regs.h
4141
arch/arm64/include/uapi/asm/perf_regs.h
42+
arch/mips/include/uapi/asm/perf_regs.h
4243
arch/powerpc/include/uapi/asm/perf_regs.h
4344
arch/s390/include/uapi/asm/perf_regs.h
4445
arch/x86/include/uapi/asm/perf_regs.h

0 commit comments

Comments
 (0)