diff options
author | David Rientjes <rientjes@google.com> | 2013-03-17 18:49:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-17 18:59:15 -0400 |
commit | 6c4d3bc99b3341067775efd4d9d13cc8e655fd7c (patch) | |
tree | 5fa3c8d83fb28edbf0dce0633460f999eae1f9ba /include | |
parent | 2a6e06b2aed6995af401dcd4feb5e79a0c7ea554 (diff) |
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>
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 71caed8626be..1d795df6f4cf 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -758,7 +758,6 @@ extern void perf_event_enable(struct perf_event *event); | |||
758 | extern void perf_event_disable(struct perf_event *event); | 758 | extern void perf_event_disable(struct perf_event *event); |
759 | extern int __perf_event_disable(void *info); | 759 | extern int __perf_event_disable(void *info); |
760 | extern void perf_event_task_tick(void); | 760 | extern void perf_event_task_tick(void); |
761 | extern void perf_restore_debug_store(void); | ||
762 | #else | 761 | #else |
763 | static inline void | 762 | static inline void |
764 | perf_event_task_sched_in(struct task_struct *prev, | 763 | perf_event_task_sched_in(struct task_struct *prev, |
@@ -798,6 +797,11 @@ static inline void perf_event_enable(struct perf_event *event) { } | |||
798 | static inline void perf_event_disable(struct perf_event *event) { } | 797 | static inline void perf_event_disable(struct perf_event *event) { } |
799 | static inline int __perf_event_disable(void *info) { return -1; } | 798 | static inline int __perf_event_disable(void *info) { return -1; } |
800 | static inline void perf_event_task_tick(void) { } | 799 | 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 | ||
801 | static inline void perf_restore_debug_store(void) { } | 805 | static inline void perf_restore_debug_store(void) { } |
802 | #endif | 806 | #endif |
803 | 807 | ||