Just a tiny nit to pick...
@@ -167,9 +169,25 @@
if(l&(1<<8))
wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
banks = l&0xff;
- for(i=1;i<banks;i++)
- {
- wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
+
+ /* Check Core version for P6 or P4/Xeon */
+
+ if(c->x86 == 6) {
+ printk(KERN_INFO "Detected P6 Core.\n");
+ for(i=1;i<banks;i++) /* Must start with bank 1 for P6 Cores */
+ {
+ wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
+ }
+ } else if(c->x86 == 15) {
+ printk(KERN_INFO "Detected P4/Xeon Core.\n");
+ for(i=0;i<banks;i++) /* Must start with bank 0 for Pentium 4 and Xeon Processors */
This function can be called by non-Intel hardware. No other vendor has
a family 15 CPU, but it's one less surprise if ever someone does make
one.
Also, take a look at bluesmoke.c in 2.5.7-dj1, it's quite a bit
different from mainline (in particular the timer foo), and also
incorporates some of the bits from your patch already.
Other than that, looks fine to me.
-- | Dave Jones. http://www.codemonkey.org.uk | SuSE Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/