From: David Rientjes <rientjes@google.com>
To: Stephane Eranian <eranian@google.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: peterz@infradead.org, Ingo Molnar <mingo@elte.hu>,
tglx@linutronix.de, Andrew Morton <akpm@linux-foundation.org>,
acme@redhat.com, jolsa@redhat.com,
Andi Kleen <ak@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [patch for-] perf,x86: fix link failure for non-Intel configs
Date: Sun, 17 Mar 2013 15:49:10 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1303171544030.368@chino.kir.corp.google.com> (raw)
In-Reply-To: <20130315132607.GA4565@quad>
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>
---
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
next prev parent reply other threads:[~2013-03-17 22:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 13:26 [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume Stephane Eranian
2013-03-15 17:01 ` Linus Torvalds
2013-03-15 20:49 ` Thomas Gleixner
2013-03-15 20:31 ` Greg KH
2013-03-15 20:49 ` Stephane Eranian
2013-03-15 20:56 ` Greg KH
2013-03-15 20:53 ` Shuah Khan
2013-03-15 20:56 ` Stephane Eranian
2013-03-16 0:45 ` Shuah Khan
2013-03-16 16:11 ` Parag Warudkar
2013-03-16 17:56 ` Linus Torvalds
2013-03-16 22:06 ` Parag Warudkar
2013-03-17 22:49 ` David Rientjes [this message]
2013-03-18 0:12 ` [patch for-] perf,x86: fix link failure for non-Intel configs Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1303171544030.368@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®