x86, mce_64.c: mce_cpu_quirks being ignored
authorVenki Pallipadi <venkatesh.pallipadi@intel.com>
Wed, 25 Jun 2008 00:12:56 +0000 (17:12 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 3 Jul 2008 13:05:21 +0000 (15:05 +0200)
Quirks getting ignored was a bug. Below patch fixes the bug, until
we have the dynamic banks support.

Sysfs choice configuration should not have any issues with the earlier patch
as we look for NR_SYSFS_BANKS in do_machine_check().

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Max Asbock <masbock@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/mcheck/mce_64.c

index 8c8299ce7ad41abd587a178981523cd4b6d4fd68..501ca1cea27d96c33711029219345a73475de274 100644 (file)
@@ -463,7 +463,11 @@ static void mce_init(void *dummy)
                wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
 
        for (i = 0; i < banks; i++) {
-               wrmsrl(MSR_IA32_MC0_CTL+4*i, ~0UL);
+               if (i < NR_SYSFS_BANKS)
+                       wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]);
+               else
+                       wrmsrl(MSR_IA32_MC0_CTL+4*i, ~0UL);
+
                wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
        }
 }