]> xenbits.xensource.com Git - xen.git/commitdiff
x86/MCE: add default switch case in init_nonfatal_mce_checker()
authorSergiy Kibrik <Sergiy_Kibrik@epam.com>
Wed, 29 May 2024 07:56:15 +0000 (09:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 29 May 2024 07:56:15 +0000 (09:56 +0200)
The default switch case block is wanted here, to handle situation
e.g. of unexpected c->x86_vendor value -- then no mcheck init is done, but
misleading message still gets logged anyway.

Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/mcheck/non-fatal.c

index 33cacd15c2b5148abb582b34a4005b4bd3e07a3c..5a53bcd0b713c9bcd4c1e9fe03908001bd3001c1 100644 (file)
@@ -29,9 +29,14 @@ static int __init cf_check init_nonfatal_mce_checker(void)
                /* Assume we are on K8 or newer AMD or Hygon CPU here */
                amd_nonfatal_mcheck_init(c);
                break;
+
        case X86_VENDOR_INTEL:
                intel_nonfatal_mcheck_init(c);
                break;
+
+       default:
+               /* unhandled vendor isn't really an error */
+               return 0;
        }
        printk(KERN_INFO "mcheck_poll: Machine check polling timer started.\n");
        return 0;