aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2017-06-13 12:28:34 -0400
committerIngo Molnar <mingo@kernel.org>2017-06-14 01:32:09 -0400
commitec33838244c8535b23b8d24b167996fd1318bb68 (patch)
tree09eead47a92bd03c99288bf8f3f4723fc0086e0e
parent86d2eac5a7045933a88c97f0453f22106bb90b54 (diff)
x86/mce: Don't disable MCA banks when offlining a CPU on AMD
AMD systems have non-core, shared MCA banks within a die. These banks are controlled by a master CPU per die. If this CPU is offlined then all the shared banks are disabled in addition to the CPU's core banks. Also, Fam17h systems may have SMT enabled. The MCA_CTL register is shared between SMT thread siblings. If a CPU is offlined then all its sibling's MCA banks are also disabled. Extend the existing vendor check to AMD too. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> [ Fix up comment. ] Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/20170613162835.30750-8-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 5cfbaeb6529a..3c54c2b9efc2 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1912,12 +1912,13 @@ static void mce_disable_error_reporting(void)
1912static void vendor_disable_error_reporting(void) 1912static void vendor_disable_error_reporting(void)
1913{ 1913{
1914 /* 1914 /*
1915 * Don't clear on Intel CPUs. Some of these MSRs are socket-wide. 1915 * Don't clear on Intel or AMD CPUs. Some of these MSRs are socket-wide.
1916 * Disabling them for just a single offlined CPU is bad, since it will 1916 * Disabling them for just a single offlined CPU is bad, since it will
1917 * inhibit reporting for all shared resources on the socket like the 1917 * inhibit reporting for all shared resources on the socket like the
1918 * last level cache (LLC), the integrated memory controller (iMC), etc. 1918 * last level cache (LLC), the integrated memory controller (iMC), etc.
1919 */ 1919 */
1920 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) 1920 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ||
1921 boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
1921 return; 1922 return;
1922 1923
1923 mce_disable_error_reporting(); 1924 mce_disable_error_reporting();