aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2013-03-17 18:49:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-17 18:59:15 -0400
commit6c4d3bc99b3341067775efd4d9d13cc8e655fd7c (patch)
tree5fa3c8d83fb28edbf0dce0633460f999eae1f9ba /include
parent2a6e06b2aed6995af401dcd4feb5e79a0c7ea554 (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.h6
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);
758extern void perf_event_disable(struct perf_event *event); 758extern void perf_event_disable(struct perf_event *event);
759extern int __perf_event_disable(void *info); 759extern int __perf_event_disable(void *info);
760extern void perf_event_task_tick(void); 760extern void perf_event_task_tick(void);
761extern void perf_restore_debug_store(void);
762#else 761#else
763static inline void 762static inline void
764perf_event_task_sched_in(struct task_struct *prev, 763perf_event_task_sched_in(struct task_struct *prev,
@@ -798,6 +797,11 @@ static inline void perf_event_enable(struct perf_event *event) { }
798static inline void perf_event_disable(struct perf_event *event) { } 797static inline void perf_event_disable(struct perf_event *event) { }
799static inline int __perf_event_disable(void *info) { return -1; } 798static inline int __perf_event_disable(void *info) { return -1; }
800static inline void perf_event_task_tick(void) { } 799static inline void perf_event_task_tick(void) { }
800#endif
801
802#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL)
803extern void perf_restore_debug_store(void);
804#else
801static inline void perf_restore_debug_store(void) { } 805static inline void perf_restore_debug_store(void) { }
802#endif 806#endif
803 807