forked from luck/tmp_suning_uos_patched
EDAC, MCE: Shorten error report formatting
Shorten up MCi_STATUS flags and add BD's new deferred and poison types. Also, simplify formatting. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
This commit is contained in:
parent
6245288232
commit
fa7ae8cc8c
|
@ -723,19 +723,22 @@ static void amd_decode_fp_mce(struct mce *m)
|
||||||
|
|
||||||
static inline void amd_decode_err_code(u16 ec)
|
static inline void amd_decode_err_code(u16 ec)
|
||||||
{
|
{
|
||||||
if (TLB_ERROR(ec)) {
|
|
||||||
pr_emerg(HW_ERR "Transaction: %s, Cache Level: %s\n",
|
pr_emerg(HW_ERR "cache level: %s", LL_MSG(ec));
|
||||||
TT_MSG(ec), LL_MSG(ec));
|
|
||||||
} else if (MEM_ERROR(ec)) {
|
if (BUS_ERROR(ec))
|
||||||
pr_emerg(HW_ERR "Transaction: %s, Type: %s, Cache Level: %s\n",
|
pr_cont(", mem/io: %s", II_MSG(ec));
|
||||||
R4_MSG(ec), TT_MSG(ec), LL_MSG(ec));
|
else
|
||||||
} else if (BUS_ERROR(ec)) {
|
pr_cont(", tx: %s", TT_MSG(ec));
|
||||||
pr_emerg(HW_ERR "Transaction: %s (%s), %s, Cache Level: %s, "
|
|
||||||
"Participating Processor: %s\n",
|
if (MEM_ERROR(ec) || BUS_ERROR(ec)) {
|
||||||
R4_MSG(ec), II_MSG(ec), TO_MSG(ec), LL_MSG(ec),
|
pr_cont(", mem-tx: %s", R4_MSG(ec));
|
||||||
PP_MSG(ec));
|
|
||||||
} else
|
if (BUS_ERROR(ec))
|
||||||
pr_emerg(HW_ERR "Huh? Unknown MCE error 0x%x\n", ec);
|
pr_cont(", part-proc: %s (%s)", PP_MSG(ec), TO_MSG(ec));
|
||||||
|
}
|
||||||
|
|
||||||
|
pr_cont("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -757,25 +760,32 @@ static bool amd_filter_mce(struct mce *m)
|
||||||
int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
|
int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
|
||||||
{
|
{
|
||||||
struct mce *m = (struct mce *)data;
|
struct mce *m = (struct mce *)data;
|
||||||
|
struct cpuinfo_x86 *c = &boot_cpu_data;
|
||||||
int node, ecc;
|
int node, ecc;
|
||||||
|
|
||||||
if (amd_filter_mce(m))
|
if (amd_filter_mce(m))
|
||||||
return NOTIFY_STOP;
|
return NOTIFY_STOP;
|
||||||
|
|
||||||
pr_emerg(HW_ERR "MC%d_STATUS: ", m->bank);
|
pr_emerg(HW_ERR "MC%d_STATUS[%s|%s|%s|%s|%s",
|
||||||
|
m->bank,
|
||||||
|
((m->status & MCI_STATUS_OVER) ? "Over" : "-"),
|
||||||
|
((m->status & MCI_STATUS_UC) ? "UE" : "CE"),
|
||||||
|
((m->status & MCI_STATUS_MISCV) ? "MiscV" : "-"),
|
||||||
|
((m->status & MCI_STATUS_PCC) ? "PCC" : "-"),
|
||||||
|
((m->status & MCI_STATUS_ADDRV) ? "AddrV" : "-"));
|
||||||
|
|
||||||
pr_cont("%sorrected error, other errors lost: %s, "
|
if (c->x86 == 0x15)
|
||||||
"CPU context corrupt: %s",
|
pr_cont("|%s|%s",
|
||||||
((m->status & MCI_STATUS_UC) ? "Unc" : "C"),
|
((m->status & BIT(44)) ? "Deferred" : "-"),
|
||||||
((m->status & MCI_STATUS_OVER) ? "yes" : "no"),
|
((m->status & BIT(43)) ? "Poison" : "-"));
|
||||||
((m->status & MCI_STATUS_PCC) ? "yes" : "no"));
|
|
||||||
|
|
||||||
/* do the two bits[14:13] together */
|
/* do the two bits[14:13] together */
|
||||||
ecc = (m->status >> 45) & 0x3;
|
ecc = (m->status >> 45) & 0x3;
|
||||||
if (ecc)
|
if (ecc)
|
||||||
pr_cont(", %sECC Error", ((ecc == 2) ? "C" : "U"));
|
pr_cont("|%sECC", ((ecc == 2) ? "C" : "U"));
|
||||||
|
|
||||||
|
pr_cont("]: 0x%016llx\n", m->status);
|
||||||
|
|
||||||
pr_cont("\n");
|
|
||||||
|
|
||||||
switch (m->bank) {
|
switch (m->bank) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -787,7 +797,7 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (boot_cpu_data.x86 == 0x15)
|
if (c->x86 == 0x15)
|
||||||
amd_decode_cu_mce(m);
|
amd_decode_cu_mce(m);
|
||||||
else
|
else
|
||||||
amd_decode_bu_mce(m);
|
amd_decode_bu_mce(m);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user