summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2009-02-19 17:34:03 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-16 17:32:17 -0700
commit474193bb19990efce7a7cf90506e55de0844c6cd (patch)
tree53d329ca12aa4a901a9b50af227414f58d41a6b1 /arch
parent5bd60e0ffb4c1b10d8942dc3dff4c7b75c968ea4 (diff)
x86: oprofile: don't set counter width from cpuid on Core2
commit 780eef9492b16a1543a3b2ae9f9526a735fc9856 upstream. Impact: fix stuck NMIs and non-working oprofile on certain CPUs Resetting the counter width of the performance counters on Intel's Core2 CPUs, breaks the delivery of NMIs, when running in x86_64 mode. This should fix bug #12395: http://bugzilla.kernel.org/show_bug.cgi?id=12395 Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Robert Richter <robert.richter@amd.com> LKML-Reference: <20090303100412.GC10085@erda.amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/oprofile/op_model_ppro.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
index e9f80c744cf3..10131fbdaada 100644
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -78,8 +78,18 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
if (cpu_has_arch_perfmon) {
union cpuid10_eax eax;
eax.full = cpuid_eax(0xa);
- if (counter_width < eax.split.bit_width)
- counter_width = eax.split.bit_width;
+
+ /*
+ * For Core2 (family 6, model 15), don't reset the
+ * counter width:
+ */
+ if (!(eax.split.version_id == 0 &&
+ current_cpu_data.x86 == 6 &&
+ current_cpu_data.x86_model == 15)) {
+
+ if (counter_width < eax.split.bit_width)
+ counter_width = eax.split.bit_width;
+ }
}
/* clear all counters */