summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-09-28 15:48:48 +0200
committerIngo Molnar <mingo@kernel.org>2013-09-28 15:48:48 +0200
commit8a3da6c7d0031fcb6a0d17f9c7a68b0e01f52855 (patch)
treeb312e40b52ceebb7d61a6a54f22dc231d4c15c55 /arch/x86/kernel/cpu/perf_event.c
parentc1bf21455d7053ad996426a4783745cf3592a5f3 (diff)
downloadlinux-8a3da6c7d0031fcb6a0d17f9c7a68b0e01f52855.tar.gz
linux-8a3da6c7d0031fcb6a0d17f9c7a68b0e01f52855.tar.bz2
linux-8a3da6c7d0031fcb6a0d17f9c7a68b0e01f52855.zip
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>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index a9c606bb4945..897783b3302a 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");