Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d144e63 authored by Venki Pallipadi's avatar Venki Pallipadi Committed by Ingo Molnar
Browse files

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: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Max Asbock <masbock@us.ibm.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a8cac817
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -463,7 +463,11 @@ static void mce_init(void *dummy)
		wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
		wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);


	for (i = 0; i < banks; i++) {
	for (i = 0; i < banks; i++) {
		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_CTL+4*i, ~0UL);

		wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
		wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
	}
	}
}
}