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

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

EDAC, mce_amd: Print ExtErrorCode and description on a single line



Save a log line by printing the extended error code and the description
on a single line. This is similar to how errors are printed in other
subsystems, e.g. "#, description". If we don't have a valid description
then only the number/code is printed.

Signed-off-by: default avatarYazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20190201225534.8177-6-Yazen.Ghannam@amd.com
parent e03447ee
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -965,13 +965,12 @@ static void decode_smca_error(struct mce *m)

	ip_name = smca_get_long_name(bank_type);

	pr_emerg(HW_ERR "%s Extended Error Code: %d\n", ip_name, xec);
	pr_emerg(HW_ERR "%s Ext. Error Code: %d", ip_name, xec);

	/* Only print the decode of valid error codes */
	if (xec < smca_mce_descs[bank_type].num_descs &&
			(hwid->xec_bitmap & BIT_ULL(xec))) {
		pr_emerg(HW_ERR "%s Error: ", ip_name);
		pr_cont("%s.\n", smca_mce_descs[bank_type].descs[xec]);
		pr_cont(", %s.\n", smca_mce_descs[bank_type].descs[xec]);
	}

	if (bank_type == SMCA_UMC && xec == 0 && decode_dram_ecc)