* [PATCH] Oprofile: Change CPUIDS from decimal to hex, and add some comments
@ 2010-04-16 17:08 John Villalovos
2010-05-04 14:03 ` Robert Richter
0 siblings, 1 reply; 3+ messages in thread
From: John Villalovos @ 2010-04-16 17:08 UTC (permalink / raw)
To: andi, linux-kernel, x86, robert.richter, oprofile-list
Back when the patch was submitted for "Add Xeon 7500 series support to
oprofile", Robert Richter had asked for a follown patch that converted
all the CPU ID values to hex.
I have done that here for the processors in the ppro_init() function and also
added some documentation as comments that I retrieved from the Intel Software
Developer's Manual (SDM) March 2010 edition in Volume 3B, Table B-1.
The Intel SDM can be found at:
http://www.intel.com/products/processor/manuals/
I also added processor codenames for some of the newer processors.
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 2c505ee..9cd591e 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -579,32 +579,53 @@ static int __init ppro_init(char **cpu_type)
return 0;
switch (cpu_model) {
- case 0 ... 2:
+ case 0x00 ... 0x02:
+ /* 06_01H: Intel Pentium Pro Processor */
*cpu_type = "i386/ppro";
break;
- case 3 ... 5:
+ case 0x03 ... 0x05:
+ /* 06_03H, 06_05H: Intel Pentium II Xeon Processor, Intel Pentium II
+ * Processor */
*cpu_type = "i386/pii";
break;
- case 6 ... 8:
- case 10 ... 11:
+ case 0x06 ... 0x08:
+ case 0x0A ... 0x0B:
+ /* 06_07H, 06_08H, 06_0AH, 06_0BH: Intel Pentium III Xeon Processor,
+ * Intel Pentium III Processor */
*cpu_type = "i386/piii";
break;
- case 9:
- case 13:
+ case 0x09:
+ case 0x0D:
+ /* 06_09H, 06_0DH: Intel Pentium M processor */
*cpu_type = "i386/p6_mobile";
break;
- case 14:
+ case 0x0E:
+ /* 06_0EH: Intel Core Duo, Intel Core Solo processors */
*cpu_type = "i386/core";
break;
- case 15: case 23:
+ case 0x0F:
+ /* 06_0FH: Intel Xeon Processor 3000, 3200, 5100, 5300, 7300 series,
+ * Intel Core 2 Quad processor 6000 series, Intel Core 2 Extreme 6000
+ * series, Intel Core 2 Duo 4000, 5000, 6000, 7000 series processors,
+ * Intel Pentium dual-core processors.
+ * Code names: Clovertown, Conroe, Kentsfield, Merom, Tigerton, and
+ * Woodcrest. */
+ case 0x17:
+ /* 06_17H: Intel Xeon Processor 5200, 5400 series, Intel Core 2 Quad
+ * processors 8000, 9000 series.
+ * Code names: Harpertown, Penryn, Wolfdale, and Yorkfield */
*cpu_type = "i386/core_2";
break;
- case 0x2e:
- case 26:
+ case 0x1A:
+ /* 06_1AH: Intel Core i7 Processor, Intel Xeon Processor 5500 series
+ * Code names: Bloomfield and Nehalem-EP */
+ case 0x2E:
+ /* 06_2EH: Intel Xeon 6500/7500 series codenamed Nehalem-EX/Beckton */
spec = &op_arch_perfmon_spec;
*cpu_type = "i386/core_i7";
break;
- case 28:
+ case 0x1C:
+ /* 06_1CH: Intel Atom processor */
*cpu_type = "i386/atom";
break;
default:
--
John Villalovos
Intel Corporation on-site partner engineer at Red Hat, Inc.
http://tabasco.usersys.redhat.com/
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Oprofile: Change CPUIDS from decimal to hex, and add some comments
2010-04-16 17:08 [PATCH] Oprofile: Change CPUIDS from decimal to hex, and add some comments John Villalovos
@ 2010-05-04 14:03 ` Robert Richter
2010-05-04 14:32 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Robert Richter @ 2010-05-04 14:03 UTC (permalink / raw)
To: John Villalovos; +Cc: andi, linux-kernel, x86, oprofile-list
On 16.04.10 13:08:49, John Villalovos wrote:
> Back when the patch was submitted for "Add Xeon 7500 series support to
> oprofile", Robert Richter had asked for a follown patch that converted
> all the CPU ID values to hex.
>
> I have done that here for the processors in the ppro_init() function and also
> added some documentation as comments that I retrieved from the Intel Software
> Developer's Manual (SDM) March 2010 edition in Volume 3B, Table B-1.
>
> The Intel SDM can be found at:
> http://www.intel.com/products/processor/manuals/
>
> I also added processor codenames for some of the newer processors.
John,
I don't want to change previous cpu models and keep it as it is. So I
am fine with updating i386/core_i7 and i386/atom to avoid mixed dec
and hex notations.
Please also remove the comments that describe the model as it will be
hard to maintain this, if there are questions one should read the
spec. So please also add some more details of the specification source
to the patch description, I think it is:
Table B-1. CPUID Signature Values of DisplayFamily_DisplayModel
in SDM Volume 3B.
Use lower case hex values instead.
Add your Signed-off-by please.
Thanks,
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Oprofile: Change CPUIDS from decimal to hex, and add some comments
2010-05-04 14:03 ` Robert Richter
@ 2010-05-04 14:32 ` Andi Kleen
0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2010-05-04 14:32 UTC (permalink / raw)
To: Robert Richter; +Cc: John Villalovos, x86, oprofile-list, linux-kernel
Robert Richter <robert.richter@amd.com> writes:
>
> Please also remove the comments that describe the model as it will be
> hard to maintain this, if there are questions one should read the
> spec. So please also add some more details of the specification source
> to the patch description, I think it is:
>
> Table B-1. CPUID Signature Values of DisplayFamily_DisplayModel
>
> in SDM Volume 3B.
Actually I tend to get it from the tables at the beginning of the
specification updates.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-04 14:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-16 17:08 [PATCH] Oprofile: Change CPUIDS from decimal to hex, and add some comments John Villalovos
2010-05-04 14:03 ` Robert Richter
2010-05-04 14:32 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox