Skip to content

Commit 9f6aef8

Browse files
yghannamsuryasaimadhu
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 89a7617 commit 9f6aef8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

drivers/edac/mce_amd.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,11 @@ static int __init mce_amd_init(void)
11891189
if (!fam_ops)
11901190
return -ENOMEM;
11911191

1192+
if (boot_cpu_has(X86_FEATURE_SMCA)) {
1193+
xec_mask = 0x3f;
1194+
goto out;
1195+
}
1196+
11921197
switch (c->x86) {
11931198
case 0xf:
11941199
fam_ops->mc0_mce = k8_mc0_mce;
@@ -1237,18 +1242,16 @@ static int __init mce_amd_init(void)
12371242

12381243
case 0x17:
12391244
case 0x18:
1240-
xec_mask = 0x3f;
1241-
if (!boot_cpu_has(X86_FEATURE_SMCA)) {
1242-
printk(KERN_WARNING "Decoding supported only on Scalable MCA processors.\n");
1243-
goto err_out;
1244-
}
1245+
pr_warn("Decoding supported only on Scalable MCA processors.\n");
1246+
goto err_out;
12451247
break;
12461248

12471249
default:
12481250
printk(KERN_WARNING "Huh? What family is it: 0x%x?!\n", c->x86);
12491251
goto err_out;
12501252
}
12511253

1254+
out:
12521255
pr_info("MCE: In-kernel MCE decoding enabled.\n");
12531256

12541257
mce_register_decode_chain(&amd_mce_dec_nb);

0 commit comments

Comments
 (0)