aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-17 09:54:23 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-10 10:44:53 -0400
commita639539fa28531924c6b5e0f3963cc63d060947d (patch)
tree8fdbfaa89c1cde5e0e5277cdbc32040bbd3f9408 /drivers
parentc5d34528696acadc40d2ba7601dbf35d65b74ad5 (diff)
i7core: enrich error information based on memory transaction type
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/i7core_edac.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 08149d5addff..9f39d3d5502e 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1352,9 +1352,9 @@ 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; 1355 char *type, *optype, *err, *msg;
1356 char *err, *msg;
1357 unsigned long error = m->status & 0x1ff0000l; 1356 unsigned long error = m->status & 0x1ff0000l;
1357 u32 optypenum = (m->status >> 4) & 0x07;
1358 u32 core_err_cnt = (m->status >> 38) && 0x7fff; 1358 u32 core_err_cnt = (m->status >> 38) && 0x7fff;
1359 u32 dimm = (m->misc >> 16) & 0x3; 1359 u32 dimm = (m->misc >> 16) & 0x3;
1360 u32 channel = (m->misc >> 18) & 0x3; 1360 u32 channel = (m->misc >> 18) & 0x3;
@@ -1366,6 +1366,27 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
1366 else 1366 else
1367 type = "NON_FATAL"; 1367 type = "NON_FATAL";
1368 1368
1369 switch (optypenum) {
1370 case 0:
1371 optype = "generic undef request";
1372 break;
1373 case 1:
1374 optype = "read error";
1375 break;
1376 case 2:
1377 optype = "write error";
1378 break;
1379 case 3:
1380 optype = "addr/cmd error";
1381 break;
1382 case 4:
1383 optype = "scrubbing error";
1384 break;
1385 default:
1386 optype = "reserved";
1387 break;
1388 }
1389
1369 switch (errnum) { 1390 switch (errnum) {
1370 case 16: 1391 case 16:
1371 err = "read ECC error"; 1392 err = "read ECC error";
@@ -1400,10 +1421,11 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
1400 1421
1401 /* FIXME: should convert addr into bank and rank information */ 1422 /* FIXME: should convert addr into bank and rank information */
1402 msg = kasprintf(GFP_ATOMIC, 1423 msg = kasprintf(GFP_ATOMIC,
1403 "%s (addr = 0x%08llx Dimm=%d, Channel=%d, " 1424 "%s (addr = 0x%08llx, Dimm=%d, Channel=%d, "
1404 "syndrome=0x%08x, count=%d Err=%d (%s))\n", 1425 "syndrome=0x%08x, count=%d, Err=%08llx:%08llx (%s: %s))\n",
1405 type, (long long) m->addr, dimm, channel, 1426 type, (long long) m->addr, dimm, channel,
1406 syndrome, core_err_cnt,errnum, err); 1427 syndrome, core_err_cnt, (long long)m->status,
1428 (long long)m->misc, optype, err);
1407 1429
1408 debugf0("%s", msg); 1430 debugf0("%s", msg);
1409 1431