提交 a639539f 编写于 作者: M Mauro Carvalho Chehab

i7core: enrich error information based on memory transaction type

Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 c5d34528
...@@ -1352,9 +1352,9 @@ static void check_mc_test_err(struct mem_ctl_info *mci, u8 socket) ...@@ -1352,9 +1352,9 @@ static void check_mc_test_err(struct mem_ctl_info *mci, u8 socket)
static void i7core_mce_output_error(struct mem_ctl_info *mci, static void i7core_mce_output_error(struct mem_ctl_info *mci,
struct mce *m) struct mce *m)
{ {
char *type; char *type, *optype, *err, *msg;
char *err, *msg;
unsigned long error = m->status & 0x1ff0000l; unsigned long error = m->status & 0x1ff0000l;
u32 optypenum = (m->status >> 4) & 0x07;
u32 core_err_cnt = (m->status >> 38) && 0x7fff; u32 core_err_cnt = (m->status >> 38) && 0x7fff;
u32 dimm = (m->misc >> 16) & 0x3; u32 dimm = (m->misc >> 16) & 0x3;
u32 channel = (m->misc >> 18) & 0x3; u32 channel = (m->misc >> 18) & 0x3;
...@@ -1366,6 +1366,27 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci, ...@@ -1366,6 +1366,27 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
else else
type = "NON_FATAL"; type = "NON_FATAL";
switch (optypenum) {
case 0:
optype = "generic undef request";
break;
case 1:
optype = "read error";
break;
case 2:
optype = "write error";
break;
case 3:
optype = "addr/cmd error";
break;
case 4:
optype = "scrubbing error";
break;
default:
optype = "reserved";
break;
}
switch (errnum) { switch (errnum) {
case 16: case 16:
err = "read ECC error"; err = "read ECC error";
...@@ -1400,10 +1421,11 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci, ...@@ -1400,10 +1421,11 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
/* FIXME: should convert addr into bank and rank information */ /* FIXME: should convert addr into bank and rank information */
msg = kasprintf(GFP_ATOMIC, msg = kasprintf(GFP_ATOMIC,
"%s (addr = 0x%08llx Dimm=%d, Channel=%d, " "%s (addr = 0x%08llx, Dimm=%d, Channel=%d, "
"syndrome=0x%08x, count=%d Err=%d (%s))\n", "syndrome=0x%08x, count=%d, Err=%08llx:%08llx (%s: %s))\n",
type, (long long) m->addr, dimm, channel, type, (long long) m->addr, dimm, channel,
syndrome, core_err_cnt,errnum, err); syndrome, core_err_cnt, (long long)m->status,
(long long)m->misc, optype, err);
debugf0("%s", msg); debugf0("%s", msg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册