ARM: 7584/1: perf: fix link error when CONFIG_HW_PERF_EVENTS is not selected
authorMarc Zyngier <Marc.Zyngier@arm.com>
Thu, 22 Nov 2012 12:05:55 +0000 (13:05 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 23 Nov 2012 13:01:30 +0000 (13:01 +0000)
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>
arch/arm/include/asm/perf_event.h

index 00416edeceadaf1f8b68583a7c6d2e979fb2b1d3..755877527cf9b963657efcda52a15f04845ef5b8 100644 (file)
 #define C(_x)                          PERF_COUNT_HW_CACHE_##_x
 #define CACHE_OP_UNSUPPORTED           0xFFFF
 
+#ifdef CONFIG_HW_PERF_EVENTS
 struct pt_regs;
 extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
 extern unsigned long perf_misc_flags(struct pt_regs *regs);
 #define perf_misc_flags(regs)  perf_misc_flags(regs)
+#endif
 
 #endif /* __ARM_PERF_EVENT_H__ */
This page took 0.026637 seconds and 5 git commands to generate.