On Mon, 30 Nov 2009, Stephen Borrill wrote:
From i386/coretemp.c:
cpumodel = CPUID2MODEL(ci->ci_signature);
/* extended model */
cpumodel += CPUID2EXTMODEL(ci->ci_signature);
But EXTMODEL is extra detail within a given model, they
can't be added together.
i.e. model 0xe with ext model 0x1 is not the same as 0xf.
Any unforeseen issues with just removing the second cpumodel
line (or altering it to cpuextmodel)?
This patch works for me on Xeon X3430:
--- coretemp.c 25 Mar 2009 22:53:51 -0000 1.12
+++ coretemp.c 30 Nov 2009 15:28:40 -0000
@@ -67,7 +67,7 @@
struct coretemp_softc *sc;
uint32_t regs[4];
uint64_t msr;
- int cpumodel, cpumask;
+ int cpumodel, cpuextmodel, cpumask;
/*
* CPUID 0x06 returns 1 if the processor has on-die thermal
@@ -85,7 +85,7 @@
(int)device_unit(ci->ci_dev));
cpumodel = CPUID2MODEL(ci->ci_signature);
/* extended model */
- cpumodel += CPUID2EXTMODEL(ci->ci_signature);
+ cpuextmodel = CPUID2EXTMODEL(ci->ci_signature);
cpumask = ci->ci_signature & 15;