diff options
author | Yazen Ghannam <Yazen.Ghannam@amd.com> | 2016-09-12 03:59:29 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-13 09:23:07 -0400 |
commit | b300e87300b68120aa5374341b252875a1cb6ea1 (patch) | |
tree | ddc4db2d8780e7bae80fc58d7bdd65f7446d43d3 | |
parent | db819d60f6720080150a365080ff656cf239f88f (diff) |
EDAC/mce_amd: Print syndrome register value on SMCA systems
Print SyndV bit status and print the raw value of the MCA_SYND register.
Further decoding of the syndrome from struct mce.synd can be done in
other places where appropriate, e.g. DRAM ECC.
Boris: make the error stanza more compact by putting the error address
and syndrome on the same line:
[Hardware Error]: Corrected error, no action required.
[Hardware Error]: CPU:2 (17:0:0) MC4_STATUS[-|CE|-|PCC|AddrV|-|-|SyndV|CECC]: 0x96204100001e0117
[Hardware Error]: Error Addr: 0x000000007f4c52e3, Syndrome: 0x0000000000000000
[Hardware Error]: Invalid IP block specified.
[Hardware Error]: cache level: L3/GEN, tx: DATA, mem-tx: RD
Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1467633035-32080-2-git-send-email-Yazen.Ghannam@amd.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | drivers/edac/mce_amd.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c index 9b6800a79c7f..057ece577800 100644 --- a/drivers/edac/mce_amd.c +++ b/drivers/edac/mce_amd.c | |||
@@ -927,7 +927,7 @@ static void decode_smca_errors(struct mce *m) | |||
927 | size_t len; | 927 | size_t len; |
928 | 928 | ||
929 | if (rdmsr_safe(addr, &low, &high)) { | 929 | if (rdmsr_safe(addr, &low, &high)) { |
930 | pr_emerg("Invalid IP block specified, error information is unreliable.\n"); | 930 | pr_emerg(HW_ERR "Invalid IP block specified.\n"); |
931 | return; | 931 | return; |
932 | } | 932 | } |
933 | 933 | ||
@@ -1078,6 +1078,8 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data) | |||
1078 | u32 low, high; | 1078 | u32 low, high; |
1079 | u32 addr = MSR_AMD64_SMCA_MCx_CONFIG(m->bank); | 1079 | u32 addr = MSR_AMD64_SMCA_MCx_CONFIG(m->bank); |
1080 | 1080 | ||
1081 | pr_cont("|%s", ((m->status & MCI_STATUS_SYNDV) ? "SyndV" : "-")); | ||
1082 | |||
1081 | if (!rdmsr_safe(addr, &low, &high) && | 1083 | if (!rdmsr_safe(addr, &low, &high) && |
1082 | (low & MCI_CONFIG_MCAX)) | 1084 | (low & MCI_CONFIG_MCAX)) |
1083 | pr_cont("|%s", ((m->status & MCI_STATUS_TCC) ? "TCC" : "-")); | 1085 | pr_cont("|%s", ((m->status & MCI_STATUS_TCC) ? "TCC" : "-")); |
@@ -1091,12 +1093,18 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data) | |||
1091 | pr_cont("]: 0x%016llx\n", m->status); | 1093 | pr_cont("]: 0x%016llx\n", m->status); |
1092 | 1094 | ||
1093 | if (m->status & MCI_STATUS_ADDRV) | 1095 | if (m->status & MCI_STATUS_ADDRV) |
1094 | pr_emerg(HW_ERR "MC%d Error Address: 0x%016llx\n", m->bank, m->addr); | 1096 | pr_emerg(HW_ERR "Error Addr: 0x%016llx", m->addr); |
1095 | 1097 | ||
1096 | if (boot_cpu_has(X86_FEATURE_SMCA)) { | 1098 | if (boot_cpu_has(X86_FEATURE_SMCA)) { |
1099 | if (m->status & MCI_STATUS_SYNDV) | ||
1100 | pr_cont(", Syndrome: 0x%016llx", m->synd); | ||
1101 | |||
1102 | pr_cont("\n"); | ||
1103 | |||
1097 | decode_smca_errors(m); | 1104 | decode_smca_errors(m); |
1098 | goto err_code; | 1105 | goto err_code; |
1099 | } | 1106 | } else |
1107 | pr_cont("\n"); | ||
1100 | 1108 | ||
1101 | if (!fam_ops) | 1109 | if (!fam_ops) |
1102 | goto err_code; | 1110 | goto err_code; |