|
@@ -2042,7 +2042,7 @@ int __init mcheck_init(void)
|
|
|
* Disable machine checks on suspend and shutdown. We can't really handle
|
|
|
* them later.
|
|
|
*/
|
|
|
-static int mce_disable_error_reporting(void)
|
|
|
+static void mce_disable_error_reporting(void)
|
|
|
{
|
|
|
int i;
|
|
|
|
|
@@ -2052,17 +2052,32 @@ static int mce_disable_error_reporting(void)
|
|
|
if (b->init)
|
|
|
wrmsrl(MSR_IA32_MCx_CTL(i), 0);
|
|
|
}
|
|
|
- return 0;
|
|
|
+ return;
|
|
|
+}
|
|
|
+
|
|
|
+static void vendor_disable_error_reporting(void)
|
|
|
+{
|
|
|
+ /*
|
|
|
+ * Don't clear on Intel CPUs. Some of these MSRs are socket-wide.
|
|
|
+ * Disabling them for just a single offlined CPU is bad, since it will
|
|
|
+ * inhibit reporting for all shared resources on the socket like the
|
|
|
+ * last level cache (LLC), the integrated memory controller (iMC), etc.
|
|
|
+ */
|
|
|
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
|
|
|
+ return;
|
|
|
+
|
|
|
+ mce_disable_error_reporting();
|
|
|
}
|
|
|
|
|
|
static int mce_syscore_suspend(void)
|
|
|
{
|
|
|
- return mce_disable_error_reporting();
|
|
|
+ vendor_disable_error_reporting();
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
static void mce_syscore_shutdown(void)
|
|
|
{
|
|
|
- mce_disable_error_reporting();
|
|
|
+ vendor_disable_error_reporting();
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -2342,19 +2357,14 @@ static void mce_device_remove(unsigned int cpu)
|
|
|
static void mce_disable_cpu(void *h)
|
|
|
{
|
|
|
unsigned long action = *(unsigned long *)h;
|
|
|
- int i;
|
|
|
|
|
|
if (!mce_available(raw_cpu_ptr(&cpu_info)))
|
|
|
return;
|
|
|
|
|
|
if (!(action & CPU_TASKS_FROZEN))
|
|
|
cmci_clear();
|
|
|
- for (i = 0; i < mca_cfg.banks; i++) {
|
|
|
- struct mce_bank *b = &mce_banks[i];
|
|
|
|
|
|
- if (b->init)
|
|
|
- wrmsrl(MSR_IA32_MCx_CTL(i), 0);
|
|
|
- }
|
|
|
+ vendor_disable_error_reporting();
|
|
|
}
|
|
|
|
|
|
static void mce_reenable_cpu(void *h)
|