mirror of https://gitee.com/openkylin/linux.git
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@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20200110015651.14887-3-Yazen.Ghannam@amd.com
This commit is contained in:
parent
89a76171bf
commit
9f6aef8631
|
@ -1189,6 +1189,11 @@ static int __init mce_amd_init(void)
|
||||||
if (!fam_ops)
|
if (!fam_ops)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
if (boot_cpu_has(X86_FEATURE_SMCA)) {
|
||||||
|
xec_mask = 0x3f;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
switch (c->x86) {
|
switch (c->x86) {
|
||||||
case 0xf:
|
case 0xf:
|
||||||
fam_ops->mc0_mce = k8_mc0_mce;
|
fam_ops->mc0_mce = k8_mc0_mce;
|
||||||
|
@ -1237,11 +1242,8 @@ static int __init mce_amd_init(void)
|
||||||
|
|
||||||
case 0x17:
|
case 0x17:
|
||||||
case 0x18:
|
case 0x18:
|
||||||
xec_mask = 0x3f;
|
pr_warn("Decoding supported only on Scalable MCA processors.\n");
|
||||||
if (!boot_cpu_has(X86_FEATURE_SMCA)) {
|
goto err_out;
|
||||||
printk(KERN_WARNING "Decoding supported only on Scalable MCA processors.\n");
|
|
||||||
goto err_out;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1249,6 +1251,7 @@ static int __init mce_amd_init(void)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
pr_info("MCE: In-kernel MCE decoding enabled.\n");
|
pr_info("MCE: In-kernel MCE decoding enabled.\n");
|
||||||
|
|
||||||
mce_register_decode_chain(&amd_mce_dec_nb);
|
mce_register_decode_chain(&amd_mce_dec_nb);
|
||||||
|
|
Loading…
Reference in New Issue