|
@@ -1207,13 +1207,18 @@ void do_machine_check(struct pt_regs *regs, long error_code)
|
|
lmce = m.mcgstatus & MCG_STATUS_LMCES;
|
|
lmce = m.mcgstatus & MCG_STATUS_LMCES;
|
|
|
|
|
|
/*
|
|
/*
|
|
|
|
+ * Local machine check may already know that we have to panic.
|
|
|
|
+ * Broadcast machine check begins rendezvous in mce_start()
|
|
* Go through all banks in exclusion of the other CPUs. This way we
|
|
* Go through all banks in exclusion of the other CPUs. This way we
|
|
* don't report duplicated events on shared banks because the first one
|
|
* don't report duplicated events on shared banks because the first one
|
|
- * to see it will clear it. If this is a Local MCE, then no need to
|
|
|
|
- * perform rendezvous.
|
|
|
|
|
|
+ * to see it will clear it.
|
|
*/
|
|
*/
|
|
- if (!lmce)
|
|
|
|
|
|
+ if (lmce) {
|
|
|
|
+ if (no_way_out)
|
|
|
|
+ mce_panic("Fatal local machine check", &m, msg);
|
|
|
|
+ } else {
|
|
order = mce_start(&no_way_out);
|
|
order = mce_start(&no_way_out);
|
|
|
|
+ }
|
|
|
|
|
|
for (i = 0; i < cfg->banks; i++) {
|
|
for (i = 0; i < cfg->banks; i++) {
|
|
__clear_bit(i, toclear);
|
|
__clear_bit(i, toclear);
|
|
@@ -1289,12 +1294,17 @@ void do_machine_check(struct pt_regs *regs, long error_code)
|
|
no_way_out = worst >= MCE_PANIC_SEVERITY;
|
|
no_way_out = worst >= MCE_PANIC_SEVERITY;
|
|
} else {
|
|
} else {
|
|
/*
|
|
/*
|
|
- * Local MCE skipped calling mce_reign()
|
|
|
|
- * If we found a fatal error, we need to panic here.
|
|
|
|
|
|
+ * If there was a fatal machine check we should have
|
|
|
|
+ * already called mce_panic earlier in this function.
|
|
|
|
+ * Since we re-read the banks, we might have found
|
|
|
|
+ * something new. Check again to see if we found a
|
|
|
|
+ * fatal error. We call "mce_severity()" again to
|
|
|
|
+ * make sure we have the right "msg".
|
|
*/
|
|
*/
|
|
- if (worst >= MCE_PANIC_SEVERITY && mca_cfg.tolerant < 3)
|
|
|
|
- mce_panic("Machine check from unknown source",
|
|
|
|
- NULL, NULL);
|
|
|
|
|
|
+ if (worst >= MCE_PANIC_SEVERITY && mca_cfg.tolerant < 3) {
|
|
|
|
+ mce_severity(&m, cfg->tolerant, &msg, true);
|
|
|
|
+ mce_panic("Local fatal machine check!", &m, msg);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|