Skip to content

Commit c7cc504

Browse files
Marc ZyngierRussell King
authored andcommitted
ARM: 7584/1: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
Commit e50c541 (ARM: perf: add guest vs host discrimination) broken the link as perf_instruction_pointer and perf_misc_flags are not defined when CONFIG_HW_PERF_EVENTS is not selected. As it make little sense to try and profile a guest without any HW event, just fallback to the original code when this config option is not selected. Reported-by: Russell King <linux@arm.linux.org.uk> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 82b5df7 commit c7cc504

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/arm/include/asm/perf_event.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
#define C(_x) PERF_COUNT_HW_CACHE_##_x
2222
#define CACHE_OP_UNSUPPORTED 0xFFFF
2323

24+
#ifdef CONFIG_HW_PERF_EVENTS
2425
struct pt_regs;
2526
extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
2627
extern unsigned long perf_misc_flags(struct pt_regs *regs);
2728
#define perf_misc_flags(regs) perf_misc_flags(regs)
29+
#endif
2830

2931
#endif /* __ARM_PERF_EVENT_H__ */

0 commit comments

Comments
 (0)