mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip:perf/urgent] perf/x86: Fix PMU detection printout when no PMU is detected
@ 2013-09-28 17:57 tip-bot for Ingo Molnar
  0 siblings, 0 replies; only message in thread
From: tip-bot for Ingo Molnar @ 2013-09-28 17:57 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, acme, hpa, mingo, a.p.zijlstra, tglx

Commit-ID:  8a3da6c7d0031fcb6a0d17f9c7a68b0e01f52855
Gitweb:     http://git.kernel.org/tip/8a3da6c7d0031fcb6a0d17f9c7a68b0e01f52855
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Sat, 28 Sep 2013 15:48:48 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 28 Sep 2013 15:48:48 +0200

perf/x86: Fix PMU detection printout when no PMU is detected

Ran into this cryptic PMU bootup log recently:

[    0.124047] Performance Events:
[    0.125000] smpboot: ...

Turns out we print this if no PMU is detected. Fall back to
the right condition so that the following is printed:

[    0.122381] Performance Events: no PMU driver, software events only.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lkml.kernel.org/n/tip-u2fwaUffakjp0qkpRfqljgsn@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index a9c606b..897783b 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1506,7 +1506,7 @@ static int __init init_hw_perf_events(void)
 		err = amd_pmu_init();
 		break;
 	default:
-		return 0;
+		err = -ENOTSUPP;
 	}
 	if (err != 0) {
 		pr_cont("no PMU driver, software events only.\n");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-28 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-28 17:57 [tip:perf/urgent] perf/x86: Fix PMU detection printout when no PMU is detected tip-bot for Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome