From: Venki Pallipadi Date: Wed, 25 Jun 2008 00:12:56 +0000 (-0700) Subject: x86, mce_64.c: mce_cpu_quirks being ignored X-Git-Tag: firefly_0821_release~19697^2~253^16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2d144e63098be47c21ad59d68a4fd17bd73a3aaf;p=firefly-linux-kernel-4.4.55.git x86, mce_64.c: mce_cpu_quirks being ignored 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 Cc: Andi Kleen Cc: Max Asbock Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 8c8299ce7ad4..501ca1cea27d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c @@ -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); } }