perf/x86/ibs: Fix undefined reference to `get_ibs_caps'
authorRobert Richter <robert.richter@amd.com>
Fri, 11 May 2012 09:44:59 +0000 (11:44 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 14 May 2012 12:31:35 +0000 (14:31 +0200)
Fixing i386 allnoconfig built errors:

 arch/x86/built-in.o: In function `amd_pmu_hw_config':
 perf_event_amd.c:(.text+0xc3e1): undefined reference to `get_ibs_caps'

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/perf_event.h

index 4e40a64315c9668a03d92ece43773fbfc2ad53f0..588f52ea810e78d1440013fd8b8043eff2353fb9 100644 (file)
@@ -188,7 +188,11 @@ struct x86_pmu_capability {
 #define IBS_OP_MAX_CNT_EXT     0x007FFFFFULL   /* not a register bit mask */
 #define IBS_RIP_INVALID                (1ULL<<38)
 
+#ifdef CONFIG_X86_LOCAL_APIC
 extern u32 get_ibs_caps(void);
+#else
+static inline u32 get_ibs_caps(void) { return 0; }
+#endif
 
 #ifdef CONFIG_PERF_EVENTS
 extern void perf_events_lapic_init(void);