From: Tim Blechmann <tim@klingt.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
robert.richter@amd.com, stable@kernel.org, tglx@linutronix.de,
tim@klingt.org, mingo@elte.hu
Subject: [tip:x86/urgent] x86: oprofile: don't set counter width from cpuid on Core2
Date: Tue, 3 Mar 2009 11:09:27 GMT [thread overview]
Message-ID: <tip-780eef9492b16a1543a3b2ae9f9526a735fc9856@git.kernel.org> (raw)
In-Reply-To: <20090303100412.GC10085@erda.amd.com>
Commit-ID: 780eef9492b16a1543a3b2ae9f9526a735fc9856
Gitweb: http://git.kernel.org/tip/780eef9492b16a1543a3b2ae9f9526a735fc9856
Author: "Tim Blechmann" <tim@klingt.org>
AuthorDate: Thu, 19 Feb 2009 17:34:03 +0100
Commit: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 3 Mar 2009 12:04:22 +0100
x86: oprofile: don't set counter width from cpuid on Core2
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>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/oprofile/op_model_ppro.c | 14 ++++++++++++--
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 e9f80c7..10131fb 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 */
prev parent reply other threads:[~2009-03-03 11:10 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-21 14:23 2.6.28-rc9: oprofile regression Tim Blechmann
2008-12-21 21:23 ` Tim Blechmann
2008-12-22 12:11 ` Robert Richter
2008-12-26 2:42 ` Andi Kleen
2009-01-02 11:04 ` Tim Blechmann
2009-01-14 17:10 ` Thomas Gleixner
2009-01-14 18:19 ` Tim Blechmann
2009-01-15 8:46 ` Thomas Gleixner
2009-01-15 9:14 ` Tim Blechmann
2009-01-15 20:37 ` Thomas Gleixner
2009-01-16 0:53 ` Tim Blechmann
2009-01-16 8:59 ` Thomas Gleixner
2009-01-16 11:29 ` Tim Blechmann
2009-01-16 15:52 ` Thomas Gleixner
2009-01-16 16:02 ` Tim Blechmann
2009-01-17 13:32 ` Tim Blechmann
2009-01-17 14:14 ` Robert Richter
2009-01-17 15:09 ` Tim Blechmann
2009-01-17 15:56 ` Robert Richter
2009-01-17 16:40 ` Tim Blechmann
2009-02-11 19:51 ` 2.6.29-rc4 regression (was: Re: 2.6.28-rc9: oprofile regression) Tim Blechmann
2009-02-13 19:07 ` Robert Richter
2009-02-16 10:23 ` Tim Blechmann
2009-02-16 11:33 ` Robert Richter
2009-02-16 12:53 ` 2.6.29-rc4 regression Tim Blechmann
2009-02-17 7:45 ` Mike Galbraith
2009-02-17 21:56 ` Tim Blechmann
2009-02-18 4:54 ` Mike Galbraith
2009-02-16 11:40 ` 2.6.29-rc4 regression (was: Re: 2.6.28-rc9: oprofile regression) Robert Richter
2009-02-19 16:34 ` [PATCH] oprofile: don't set counter width from cpuid on core2 Tim Blechmann
2009-03-03 10:04 ` Robert Richter
2009-03-03 11:05 ` Ingo Molnar
2009-03-03 11:09 ` Tim Blechmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-780eef9492b16a1543a3b2ae9f9526a735fc9856@git.kernel.org \
--to=tim@klingt.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=robert.richter@amd.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome