perf,x86: fix link failure for non-Intel configs

Commit 1d9d8639c063 ("perf,x86: fix kernel crash with PEBS/BTS after
suspend/resume") introduces a link failure since
perf_restore_debug_store() is only defined for CONFIG_CPU_SUP_INTEL:

arch/x86/power/built-in.o: In function `restore_processor_state':
(.text+0x45c): undefined reference to `perf_restore_debug_store'

Fix it by defining the dummy function appropriately.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by David Rientjes and committed by Linus Torvalds 6c4d3bc9 2a6e06b2

Changed files
+5 -1
include
linux
+5 -1
include/linux/perf_event.h
··· 758 758 extern void perf_event_disable(struct perf_event *event); 759 759 extern int __perf_event_disable(void *info); 760 760 extern void perf_event_task_tick(void); 761 - extern void perf_restore_debug_store(void); 762 761 #else 763 762 static inline void 764 763 perf_event_task_sched_in(struct task_struct *prev, ··· 797 798 static inline void perf_event_disable(struct perf_event *event) { } 798 799 static inline int __perf_event_disable(void *info) { return -1; } 799 800 static inline void perf_event_task_tick(void) { } 801 + #endif 802 + 803 + #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) 804 + extern void perf_restore_debug_store(void); 805 + #else 800 806 static inline void perf_restore_debug_store(void) { } 801 807 #endif 802 808