perf/x86/intel/uncore: Fix boot crash on SBOX PMU on Haswell-EP
authorAndi Kleen <ak@linux.intel.com>
Tue, 4 Nov 2014 01:00:28 +0000 (17:00 -0800)
committerIngo Molnar <mingo@kernel.org>
Sun, 16 Nov 2014 08:53:36 +0000 (09:53 +0100)
commit68055915c1c22489f9658bd2b7391bb11b2cf4e4
treed1fc12606a313d76851d468b09eb1cede3a0c0d9
parent41a134a5830a5e1396723ace0a63000780d6e267
perf/x86/intel/uncore: Fix boot crash on SBOX PMU on Haswell-EP

There were several reports that on some systems writing the SBOX0 PMU
initialization MSR would #GP at boot. This did not happen on all
systems -- my two test systems booted fine.

Writing the three initialization bits bit-by-bit seems to avoid the
problem. So add a special callback to do just that.

This replaces an earlier patch that disabled the SBOX.

Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Reported-and-Tested-by: Patrick Lu <patrick.lu@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Link: http://lkml.kernel.org/r/1415062828-19759-4-git-send-email-andi@firstfloor.org
[ Fixed a whitespace error and added attribution tags that were left out inexplicably. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c