]>
Commit | Line | Data |
---|---|---|
49f412f4 GKH |
1 | From 6c4d3bc99b3341067775efd4d9d13cc8e655fd7c Mon Sep 17 00:00:00 2001 |
2 | From: David Rientjes <rientjes@google.com> | |
3 | Date: Sun, 17 Mar 2013 15:49:10 -0700 | |
4 | Subject: perf,x86: fix link failure for non-Intel configs | |
5 | ||
6 | From: David Rientjes <rientjes@google.com> | |
7 | ||
8 | commit 6c4d3bc99b3341067775efd4d9d13cc8e655fd7c upstream. | |
9 | ||
10 | Commit 1d9d8639c063 ("perf,x86: fix kernel crash with PEBS/BTS after | |
11 | suspend/resume") introduces a link failure since | |
12 | perf_restore_debug_store() is only defined for CONFIG_CPU_SUP_INTEL: | |
13 | ||
14 | arch/x86/power/built-in.o: In function `restore_processor_state': | |
15 | (.text+0x45c): undefined reference to `perf_restore_debug_store' | |
16 | ||
17 | Fix it by defining the dummy function appropriately. | |
18 | ||
19 | Signed-off-by: David Rientjes <rientjes@google.com> | |
20 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
22 | ||
23 | --- | |
24 | include/linux/perf_event.h | 6 +++++- | |
25 | 1 file changed, 5 insertions(+), 1 deletion(-) | |
26 | ||
27 | --- a/include/linux/perf_event.h | |
28 | +++ b/include/linux/perf_event.h | |
29 | @@ -753,7 +753,6 @@ extern void perf_event_enable(struct per | |
30 | extern void perf_event_disable(struct perf_event *event); | |
31 | extern int __perf_event_disable(void *info); | |
32 | extern void perf_event_task_tick(void); | |
33 | -extern void perf_restore_debug_store(void); | |
34 | #else | |
35 | static inline void | |
36 | perf_event_task_sched_in(struct task_struct *prev, | |
37 | @@ -793,6 +792,11 @@ static inline void perf_event_enable(str | |
38 | static inline void perf_event_disable(struct perf_event *event) { } | |
39 | static inline int __perf_event_disable(void *info) { return -1; } | |
40 | static inline void perf_event_task_tick(void) { } | |
41 | +#endif | |
42 | + | |
43 | +#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) | |
44 | +extern void perf_restore_debug_store(void); | |
45 | +#else | |
46 | static inline void perf_restore_debug_store(void) { } | |
47 | #endif | |
48 |