Skip to content

Commit 65d71fe

Browse files
Peter Zijlstra (Intel)ingomolnar
authored andcommitted
perf: Fix bogus kernel printk
Andy spotted the fail in what was intended as a conditional printk level. Reported-by: Andy Lutomirski <luto@amacapital.net> Fixes: cc6cd47 ("perf/x86: Tone down kernel messages when the PMU check fails in a virtual environment") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/20141007124757.GH19379@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent e53f612 commit 65d71fe

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎arch/x86/kernel/cpu/perf_event.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,9 @@ static bool check_hw_exists(void)
243243

244244
msr_fail:
245245
printk(KERN_CONT "Broken PMU hardware detected, using software events only.\n");
246-
printk(boot_cpu_has(X86_FEATURE_HYPERVISOR) ? KERN_INFO : KERN_ERR
247-
"Failed to access perfctr msr (MSR %x is %Lx)\n", reg, val_new);
246+
printk("%sFailed to access perfctr msr (MSR %x is %Lx)\n",
247+
boot_cpu_has(X86_FEATURE_HYPERVISOR) ? KERN_INFO : KERN_ERR,
248+
reg, val_new);
248249

249250
return false;
250251
}

0 commit comments

Comments
 (0)