aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/i7core_edac.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index e2f6dfdca841..08149d5addff 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1352,7 +1352,7 @@ static void check_mc_test_err(struct mem_ctl_info *mci, u8 socket)
1352static void i7core_mce_output_error(struct mem_ctl_info *mci, 1352static void i7core_mce_output_error(struct mem_ctl_info *mci,
1353 struct mce *m) 1353 struct mce *m)
1354{ 1354{
1355 char *type="NON-FATAL"; 1355 char *type;
1356 char *err, *msg; 1356 char *err, *msg;
1357 unsigned long error = m->status & 0x1ff0000l; 1357 unsigned long error = m->status & 0x1ff0000l;
1358 u32 core_err_cnt = (m->status >> 38) && 0x7fff; 1358 u32 core_err_cnt = (m->status >> 38) && 0x7fff;
@@ -1361,6 +1361,11 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
1361 u32 syndrome = m->misc >> 32; 1361 u32 syndrome = m->misc >> 32;
1362 u32 errnum = find_first_bit(&error, 32); 1362 u32 errnum = find_first_bit(&error, 32);
1363 1363
1364 if (m->mcgstatus & 1)
1365 type = "FATAL";
1366 else
1367 type = "NON_FATAL";
1368
1364 switch (errnum) { 1369 switch (errnum) {
1365 case 16: 1370 case 16:
1366 err = "read ECC error"; 1371 err = "read ECC error";
@@ -1454,7 +1459,8 @@ static void i7core_check_error(struct mem_ctl_info *mci)
1454 */ 1459 */
1455static int i7core_mce_check_error(void *priv, struct mce *mce) 1460static int i7core_mce_check_error(void *priv, struct mce *mce)
1456{ 1461{
1457 struct i7core_pvt *pvt = priv; 1462 struct mem_ctl_info *mci = priv;
1463 struct i7core_pvt *pvt = mci->pvt_info;
1458 unsigned long flags; 1464 unsigned long flags;
1459 1465
1460 debugf0(__FILE__ ": %s()\n", __func__); 1466 debugf0(__FILE__ ": %s()\n", __func__);
@@ -1477,6 +1483,10 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
1477 } 1483 }
1478 spin_unlock_irqrestore(&pvt->mce_lock, flags); 1484 spin_unlock_irqrestore(&pvt->mce_lock, flags);
1479 1485
1486 /* Handle fatal errors immediately */
1487 if (mce->mcgstatus & 1)
1488 i7core_check_error(mci);
1489
1480 /* Advice mcelog that the error were handled */ 1490 /* Advice mcelog that the error were handled */
1481 return 1; 1491 return 1;
1482} 1492}
@@ -1601,7 +1611,7 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
1601 pvt->inject.col = -1; 1611 pvt->inject.col = -1;
1602 1612
1603 /* Registers on edac_mce in order to receive memory errors */ 1613 /* Registers on edac_mce in order to receive memory errors */
1604 pvt->edac_mce.priv = pvt; 1614 pvt->edac_mce.priv = mci;
1605 pvt->edac_mce.check_error = i7core_mce_check_error; 1615 pvt->edac_mce.check_error = i7core_mce_check_error;
1606 spin_lock_init(&pvt->mce_lock); 1616 spin_lock_init(&pvt->mce_lock);
1607 1617