perf/x86/amd: Rework AMD PMU init code
authorPeter Zijlstra <peterz@infradead.org>
Tue, 21 May 2013 11:05:37 +0000 (13:05 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 May 2013 07:13:55 +0000 (09:13 +0200)
commit1b45adcd9a503428e6de6b39bc6892d86c9c1d41
tree07bed004c5f63ca1a4097ae91c3a2bc3d11ad19c
parent2b923c8f5de6722393e614b096d5040b6d4eaf98
perf/x86/amd: Rework AMD PMU init code

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>
arch/x86/kernel/cpu/perf_event_amd.c