perf/x86/amd: Rework AMD PMU init code
authorPeter Zijlstra <peterz@infradead.org>
Tue, 21 May 2013 11:05:37 +0000 (13:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Aug 2015 03:51:38 +0000 (20:51 -0700)
commit3d8231988d46318b1039f057b78df6c9630e96f4
treed400624a893ad6a744cbb2df1beba14ba52ad328
parent14c99cd5cdd34ee464eeb1fc9f0d560672a4f2ec
perf/x86/amd: Rework AMD PMU init code

commit 1b45adcd9a503428e6de6b39bc6892d86c9c1d41 upstream.

Josh reported that his QEMU is a bad hardware emulator and trips a
WARN in the AMD PMU init code. He requested the WARN be turned into a
pr_err() or similar.

While there, rework the code a little.

Reported-by: Josh Boyer <jwboyer@redhat.com>
Acked-by: Robert Richter <rric@kernel.org>
Acked-by: Jacob Shin <jacob.shin@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130521110537.GG26912@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/perf_event_amd.c