[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABPqkBQZTUaRjA6NiVFw0hoOw_6Wu8kNjiCCNYXLZKOTt+ZbSw@mail.gmail.com>
Date: Mon, 18 Mar 2013 01:12:37 +0100
From: Stephane Eranian <eranian@...gle.com>
To: David Rientjes <rientjes@...gle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Jiri Olsa <jolsa@...hat.com>, Andi Kleen <ak@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch for-] perf,x86: fix link failure for non-Intel configs
On Sun, Mar 17, 2013 at 11:49 PM, David Rientjes <rientjes@...gle.com> wrote:
> 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@...gle.com>
Yeah, missed that. Too bad we have to pull SUP_INTEL into
a generic header file. But the alternative would be to use a weak()
function in core.c which is not nicer, in my opinion.
Acked-by: Stephane Eranian <eranian@...gle.com>
> ---
> include/linux/perf_event.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> --- 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);
> extern void perf_event_disable(struct perf_event *event);
> extern int __perf_event_disable(void *info);
> 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 *prev,
> @@ -798,6 +797,11 @@ static inline void perf_event_enable(struct perf_event *event) { }
> static inline void perf_event_disable(struct perf_event *event) { }
> static inline int __perf_event_disable(void *info) { return -1; }
> 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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists