Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

EDAC, mce_amd: Don't report poison bit on Fam15h, bank 4

MCA_STATUS[43] has been defined as "Poison" or "Reserved" for every bank
since Fam15h except for Fam15h, bank 4 in which case it's defined as
part of the McaStatSubCache bitfield.

Filter out that case.

Reported-by: Dean Liberty <Dean.Liberty@amd.com>
Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1479478222-19896-1-git-send-email-Yazen.Ghannam@amd.com
[ Split an almost unparseable ternary conditional, add a comment. ]
Signed-off-by: Borislav Petkov <bp@suse.de>

authored by

Yazen Ghannam and committed by
Borislav Petkov
a6c14dce b64ce7cd

+7 -4
+7 -4
drivers/edac/mce_amd.c
··· 964 964 ((m->status & MCI_STATUS_PCC) ? "PCC" : "-"), 965 965 ((m->status & MCI_STATUS_ADDRV) ? "AddrV" : "-")); 966 966 967 - if (c->x86 >= 0x15) 968 - pr_cont("|%s|%s", 969 - ((m->status & MCI_STATUS_DEFERRED) ? "Deferred" : "-"), 970 - ((m->status & MCI_STATUS_POISON) ? "Poison" : "-")); 967 + if (c->x86 >= 0x15) { 968 + pr_cont("|%s", (m->status & MCI_STATUS_DEFERRED ? "Deferred" : "-")); 969 + 970 + /* F15h, bank4, bit 43 is part of McaStatSubCache. */ 971 + if (c->x86 != 0x15 || m->bank != 4) 972 + pr_cont("|%s", (m->status & MCI_STATUS_POISON ? "Poison" : "-")); 973 + } 971 974 972 975 if (boot_cpu_has(X86_FEATURE_SMCA)) { 973 976 u32 low, high;