summaryrefslogtreecommitdiffstats
path: root/drivers/edac/mce_amd.c
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2012-09-14 20:25:37 +0200
committerBorislav Petkov <bp@alien8.de>2012-11-28 11:56:30 +0100
commitd5c6770d4cb27bc33aa433cf8fb848ad9af6644b (patch)
treeb334cce3aaa3535e60585834a43031f51606e66b /drivers/edac/mce_amd.c
parentd824c7718b78b6a5afae7fc78731b70318cd076f (diff)
downloadblackbird-op-linux-d5c6770d4cb27bc33aa433cf8fb848ad9af6644b.tar.gz
blackbird-op-linux-d5c6770d4cb27bc33aa433cf8fb848ad9af6644b.zip
MCE, AMD: Dump error status
Dump error status after decoding the error which describes the error disposition. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/mce_amd.c')
-rw-r--r--drivers/edac/mce_amd.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index f856a2531cec..ad637572d8c7 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -667,6 +667,22 @@ static bool amd_filter_mce(struct mce *m)
return false;
}
+static const char *decode_error_status(struct mce *m)
+{
+ if (m->status & MCI_STATUS_UC) {
+ if (m->status & MCI_STATUS_PCC)
+ return "System Fatal error.";
+ if (m->mcgstatus & MCG_STATUS_RIPV)
+ return "Uncorrected, software restartable error.";
+ return "Uncorrected, software containable error.";
+ }
+
+ if (m->status & MCI_STATUS_DEFERRED)
+ return "Deferred error.";
+
+ return "Corrected error, no action required.";
+}
+
int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
{
struct mce *m = (struct mce *)data;
@@ -712,6 +728,8 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
break;
}
+ pr_emerg(HW_ERR "Error Status: %s\n", decode_error_status(m));
+
pr_emerg(HW_ERR "CPU:%d (%x:%x:%x) MC%d_STATUS[%s|%s|%s|%s|%s",
m->extcpu,
c->x86, c->x86_model, c->x86_mask,
@@ -724,8 +742,8 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
if (c->x86 == 0x15)
pr_cont("|%s|%s",
- ((m->status & BIT_64(44)) ? "Deferred" : "-"),
- ((m->status & BIT_64(43)) ? "Poison" : "-"));
+ ((m->status & MCI_STATUS_DEFERRED) ? "Deferred" : "-"),
+ ((m->status & MCI_STATUS_POISON) ? "Poison" : "-"));
/* do the two bits[14:13] together */
ecc = (m->status >> 45) & 0x3;
OpenPOWER on IntegriCloud