Commit 8a3da6c7 authored by Ingo Molnar's avatar Ingo Molnar

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.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent c1bf2145
...@@ -1506,7 +1506,7 @@ static int __init init_hw_perf_events(void) ...@@ -1506,7 +1506,7 @@ static int __init init_hw_perf_events(void)
err = amd_pmu_init(); err = amd_pmu_init();
break; break;
default: default:
return 0; err = -ENOTSUPP;
} }
if (err != 0) { if (err != 0) {
pr_cont("no PMU driver, software events only.\n"); pr_cont("no PMU driver, software events only.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment