MCE, AMD: Limit MCE decoding to current families for now
authorBorislav Petkov <borislav.petkov@amd.com>
Fri, 6 Aug 2010 16:55:45 +0000 (18:55 +0200)
committerBorislav Petkov <borislav.petkov@amd.com>
Tue, 24 Aug 2010 16:06:54 +0000 (18:06 +0200)
Limit MCE error decoding to current and older families only (K8-F11h).

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
drivers/edac/edac_mce_amd.c

index bae9351e9473872214d6bd9870776a2c48680909..352dcc6c8971adde353e326fefa35d9ec1e84d9e 100644 (file)
@@ -426,11 +426,15 @@ 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))
-               atomic_notifier_chain_register(&x86_mce_decoder_chain, &amd_mce_dec_nb);
+       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;
 }