From 36c5361385644dd8ff4cb1b26cf9028db4ec7c83 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Thu, 19 Feb 2009 17:34:03 +0100 Subject: [PATCH] --- yaml --- r: 132009 b: refs/heads/master c: 780eef9492b16a1543a3b2ae9f9526a735fc9856 h: refs/heads/master i: 132007: d700f4081f9f7954801eb34ad1b019ab85ef13af v: v3 --- [refs] | 2 +- trunk/arch/x86/oprofile/op_model_ppro.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 80ac9884bbc7..938bad535fa4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0fc59d3a01820765e5f3a723733728758b0cf577 +refs/heads/master: 780eef9492b16a1543a3b2ae9f9526a735fc9856 diff --git a/trunk/arch/x86/oprofile/op_model_ppro.c b/trunk/arch/x86/oprofile/op_model_ppro.c index e9f80c744cf3..10131fbdaada 100644 --- a/trunk/arch/x86/oprofile/op_model_ppro.c +++ b/trunk/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 */