diff options
author | David Rientjes <rientjes@google.com> | 2013-03-17 15:49:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-20 12:58:53 -0700 |
commit | 68e0bbe8b7781877de7dc96d620a4ce6af8807f9 (patch) | |
tree | 05c2915cbe223c09e1a9a8832267b793f2e19131 /include | |
parent | fe204aa40cedb6c34c5865be223da8f77d6a1545 (diff) |
perf,x86: fix link failure for non-Intel configs
commit 6c4d3bc99b3341067775efd4d9d13cc8e655fd7c upstream.
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/perf_event.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 038ad4af336..67b9fbc4d33 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -1153,7 +1153,6 @@ extern void perf_swevent_put_recursion_context(int rctx); extern void perf_event_enable(struct perf_event *event); extern void perf_event_disable(struct perf_event *event); extern void perf_event_task_tick(void); -extern void perf_restore_debug_store(void); #else static inline void perf_event_task_sched_in(struct task_struct *task) { } @@ -1188,6 +1187,11 @@ static inline void perf_swevent_put_recursion_context(int rctx) { } static inline void perf_event_enable(struct perf_event *event) { } static inline void perf_event_disable(struct perf_event *event) { } static inline void perf_event_task_tick(void) { } +#endif + +#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) +extern void perf_restore_debug_store(void); +#else static inline void perf_restore_debug_store(void) { } #endif |