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

Commit e045c291 authored by Borislav Petkov's avatar Borislav Petkov
Browse files

MCE, AMD: Limit MCE decoding to current families for now



Limit MCE error decoding to current and older families only (K8-F11h).

Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent 76be97c1
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -426,10 +426,14 @@ static struct notifier_block amd_mce_dec_nb = {
static int __init mce_amd_init(void)
{
	/*
	 * We can decode MCEs for Opteron and later CPUs:
	 * We can decode MCEs for K8, F10h and F11h CPUs:
	 */
	if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
	    (boot_cpu_data.x86 >= 0xf))
	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
		return 0;

	if (boot_cpu_data.x86 < 0xf || boot_cpu_data.x86 > 0x11)
		return 0;

	atomic_notifier_chain_register(&x86_mce_decoder_chain, &amd_mce_dec_nb);

	return 0;