[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <157920855605.396.13628660534731252208.tip-bot2@tip-bot2>
Date: Thu, 16 Jan 2020 21:02:36 -0000
From: "tip-bot2 for Yazen Ghannam" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Yazen Ghannam <yazen.ghannam@....com>,
Borislav Petkov <bp@...e.de>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: ras/core] EDAC/mce_amd: Always load on SMCA systems
The following commit has been merged into the ras/core branch of tip:
Commit-ID: 9f6aef86315ac31481a288ba1b3f43b2aac93757
Gitweb: https://git.kernel.org/tip/9f6aef86315ac31481a288ba1b3f43b2aac93757
Author: Yazen Ghannam <yazen.ghannam@....com>
AuthorDate: Fri, 10 Jan 2020 01:56:48
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Thu, 16 Jan 2020 17:09:13 +01:00
EDAC/mce_amd: Always load on SMCA systems
MCA error decoding on SMCA systems is not dependent on family. Return
success early if the system supports the SMCA feature.
Signed-off-by: Yazen Ghannam <yazen.ghannam@....com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lkml.kernel.org/r/20200110015651.14887-3-Yazen.Ghannam@amd.com
---
drivers/edac/mce_amd.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index aa6ea53..524c63f 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -1189,6 +1189,11 @@ static int __init mce_amd_init(void)
if (!fam_ops)
return -ENOMEM;
+ if (boot_cpu_has(X86_FEATURE_SMCA)) {
+ xec_mask = 0x3f;
+ goto out;
+ }
+
switch (c->x86) {
case 0xf:
fam_ops->mc0_mce = k8_mc0_mce;
@@ -1237,11 +1242,8 @@ static int __init mce_amd_init(void)
case 0x17:
case 0x18:
- xec_mask = 0x3f;
- if (!boot_cpu_has(X86_FEATURE_SMCA)) {
- printk(KERN_WARNING "Decoding supported only on Scalable MCA processors.\n");
- goto err_out;
- }
+ pr_warn("Decoding supported only on Scalable MCA processors.\n");
+ goto err_out;
break;
default:
@@ -1249,6 +1251,7 @@ static int __init mce_amd_init(void)
goto err_out;
}
+out:
pr_info("MCE: In-kernel MCE decoding enabled.\n");
mce_register_decode_chain(&amd_mce_dec_nb);
Powered by blists - more mailing lists