Skip to content

Commit e716e69

Browse files
Dapeng Miacmel
authored andcommitted
perf arch: Update arch headers to use relative UAPI paths
The architectural specific headers perf_regs.h currently rely on the host architecture's 'asm/perf_regs.h'. This can lead to compilation inconsistencies or failures when including and building perf for a target architecture that differs from the host's architecture. Explicitly point to the UAPI headers within the tools source tree using relative paths. This ensures that perf is always built against the intended architecture. No functional changes are intended. Reviewed-by: Ian Rogers <[email protected]> Signed-off-by: Dapeng Mi <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Albert Ou <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Alexandre Ghiti <[email protected]> Cc: Guo Ren <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: John Garry <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Falcon <[email protected]> Cc: Will Deacon <[email protected]> Cc: Xudong Hao <[email protected]> Cc: Zide Chen <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent c2e28ae commit e716e69

9 files changed

Lines changed: 9 additions & 9 deletions

File tree

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

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

55
#include <stdlib.h>
66
#include <linux/types.h>
7-
#include <asm/perf_regs.h>
7+
#include "../../../../arch/arm/include/uapi/asm/perf_regs.h"
88

99
void perf_regs_load(u64 *regs);
1010

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <stdlib.h>
66
#include <linux/types.h>
77
#define perf_event_arm_regs perf_event_arm64_regs
8-
#include <asm/perf_regs.h>
8+
#include "../../../../arch/arm64/include/uapi/asm/perf_regs.h"
99
#undef perf_event_arm_regs
1010

1111
void perf_regs_load(u64 *regs);

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

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

77
#include <stdlib.h>
88
#include <linux/types.h>
9-
#include <asm/perf_regs.h>
9+
#include "../../../../arch/csky/include/uapi/asm/perf_regs.h"
1010

1111
#define PERF_REGS_MASK ((1ULL << PERF_REG_CSKY_MAX) - 1)
1212
#define PERF_REGS_MAX PERF_REG_CSKY_MAX

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

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

55
#include <stdlib.h>
66
#include <linux/types.h>
7-
#include <asm/perf_regs.h>
7+
#include "../../../../arch/loongarch/include/uapi/asm/perf_regs.h"
88

99
#define PERF_REGS_MAX PERF_REG_LOONGARCH_MAX
1010

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

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

55
#include <stdlib.h>
66
#include <linux/types.h>
7-
#include <asm/perf_regs.h>
7+
#include "../../../../arch/mips/include/uapi/asm/perf_regs.h"
88

99
#define PERF_REGS_MAX PERF_REG_MIPS_MAX
1010

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

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

55
#include <stdlib.h>
66
#include <linux/types.h>
7-
#include <asm/perf_regs.h>
7+
#include "../../../../arch/powerpc/include/uapi/asm/perf_regs.h"
88

99
void perf_regs_load(u64 *regs);
1010

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

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

77
#include <stdlib.h>
88
#include <linux/types.h>
9-
#include <asm/perf_regs.h>
9+
#include "../../../../arch/riscv/include/uapi/asm/perf_regs.h"
1010

1111
#define PERF_REGS_MASK ((1ULL << PERF_REG_RISCV_MAX) - 1)
1212
#define PERF_REGS_MAX PERF_REG_RISCV_MAX

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 <asm/perf_regs.h>
6+
#include "../../../../arch/s390/include/uapi/asm/perf_regs.h"
77

88
void perf_regs_load(u64 *regs);
99

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

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

55
#include <stdlib.h>
66
#include <linux/types.h>
7-
#include <asm/perf_regs.h>
7+
#include "../../../../arch/x86/include/uapi/asm/perf_regs.h"
88

99
void perf_regs_load(u64 *regs);
1010

0 commit comments

Comments
 (0)