From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: jun.nakajima@intel.com, eranian@google.com,
a.p.zijlstra@chello.nl, mingo@kernel.org,
linux-kernel@vger.kernel.org
Subject: SNB-PEBS errate in perf code - omits stepping 2?
Date: Mon, 11 Mar 2013 15:15:07 -0400 [thread overview]
Message-ID: <20130311191507.GA31827@phenom.dumpdata.com> (raw)
Hey,
I think quirk:
+static int intel_snb_pebs_broken(int cpu)
+{
+ u32 rev = UINT_MAX; /* default to broken for unknown models */
+
+ switch (cpu_data(cpu).x86_model) {
+ case 42: /* SNB */
+ rev = 0x28;
+ break;
+
+ case 45: /* SNB-EP */
+ switch (cpu_data(cpu).x86_mask) {
+ case 6: rev = 0x618; break;
+ case 7: rev = 0x70c; break;
+ }
+ }
+
+ return (cpu_data(cpu).microcode < rev);
+}
+
needs a bit of update? I've this CPU:
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Genuine Intel(R) CPU @ 2.30GHz
stepping : 2
cpu MHz : 2294.534
cache size : 20480 KB
..
microcode : 0x8000020c
and since the stepping is '2' and there are no 'default' case
in the switch statement, it ends up failing b/c it is asking
for revision UINT_MAX.
Is there a specific microcode errate version for this type
of CPU? Or am I a lucky recipient of an early development CPU?
Perhaps that check should also have this:
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 529c893..287d43a 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -1845,6 +1845,9 @@ static int intel_snb_pebs_broken(int cpu)
case 7: rev = 0x70c; break;
}
}
+ if (rev == UINT_MAX)
+ pr_warn("Please contact Intel to update quirk as you have"
+ "an unknown CPU stepping: %d\n", cpu_data(cpu).x86_mask);
return (cpu_data(cpu).microcode < rev);
}
next reply other threads:[~2013-03-11 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 19:15 Konrad Rzeszutek Wilk [this message]
2013-03-12 13:06 ` SNB-PEBS errate in perf code - omits stepping 2? Stephane Eranian
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=20130311191507.GA31827@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=a.p.zijlstra@chello.nl \
--cc=eranian@google.com \
--cc=jun.nakajima@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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