Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6c14dce authored by Yazen Ghannam's avatar Yazen Ghannam Committed by Borislav Petkov
Browse files

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: default avatarDean Liberty <Dean.Liberty@amd.com>
Signed-off-by: default avatarYazen 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: default avatarBorislav Petkov <bp@suse.de>
parent b64ce7cd
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -964,10 +964,13 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
		((m->status & MCI_STATUS_PCC)	? "PCC"	  : "-"),
		((m->status & MCI_STATUS_PCC)	? "PCC"	  : "-"),
		((m->status & MCI_STATUS_ADDRV)	? "AddrV" : "-"));
		((m->status & MCI_STATUS_ADDRV)	? "AddrV" : "-"));


	if (c->x86 >= 0x15)
	if (c->x86 >= 0x15) {
		pr_cont("|%s|%s",
		pr_cont("|%s", (m->status & MCI_STATUS_DEFERRED ? "Deferred" : "-"));
			((m->status & MCI_STATUS_DEFERRED) ? "Deferred" : "-"),

			((m->status & MCI_STATUS_POISON)   ? "Poison"   : "-"));
		/* F15h, bank4, bit 43 is part of McaStatSubCache. */
		if (c->x86 != 0x15 || m->bank != 4)
			pr_cont("|%s", (m->status & MCI_STATUS_POISON ? "Poison" : "-"));
	}


	if (boot_cpu_has(X86_FEATURE_SMCA)) {
	if (boot_cpu_has(X86_FEATURE_SMCA)) {
		u32 low, high;
		u32 low, high;