Skip to content

Commit 6c4d3bc

Browse files
rientjestorvalds
authored andcommitted
perf,x86: fix link failure for non-Intel configs
Commit 1d9d863 ("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 <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 2a6e06b commit 6c4d3bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/linux/perf_event.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,6 @@ extern void perf_event_enable(struct perf_event *event);
758758
extern void perf_event_disable(struct perf_event *event);
759759
extern int __perf_event_disable(void *info);
760760
extern void perf_event_task_tick(void);
761-
extern void perf_restore_debug_store(void);
762761
#else
763762
static inline void
764763
perf_event_task_sched_in(struct task_struct *prev,
@@ -798,6 +797,11 @@ static inline void perf_event_enable(struct perf_event *event) { }
798797
static inline void perf_event_disable(struct perf_event *event) { }
799798
static inline int __perf_event_disable(void *info) { return -1; }
800799
static inline void perf_event_task_tick(void) { }
800+
#endif
801+
802+
#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL)
803+
extern void perf_restore_debug_store(void);
804+
#else
801805
static inline void perf_restore_debug_store(void) { }
802806
#endif
803807

0 commit comments

Comments
 (0)