]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mce: make 'found_error' and 'mce_fatal_cpus' private to mcheck_cmn_handler()
authorHaozhong Zhang <haozhong.zhang@intel.com>
Wed, 31 May 2017 06:39:22 +0000 (08:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 31 May 2017 06:39:22 +0000 (08:39 +0200)
mcheck_cmn_handler() is the only user of 'found_error' and
'mce_fatal_cpus'.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/mcheck/mce.c

index 0d9d5b05894baae9edc90fd99dc52b02d94055ce..54fd000aa07ef1bc9271a064e23d5c96ab01effb 100644 (file)
@@ -182,9 +182,6 @@ void mce_need_clearbank_register(mce_need_clearbank_t cbfunc)
  */
 static DEFINE_SPINLOCK(mce_logout_lock);
 
-static atomic_t found_error = ATOMIC_INIT(0);
-static cpumask_t mce_fatal_cpus;
-
 const struct mca_error_handler *__read_mostly mce_dhandlers;
 const struct mca_error_handler *__read_mostly mce_uhandlers;
 unsigned int __read_mostly mce_dhandler_num;
@@ -450,6 +447,8 @@ void mcheck_cmn_handler(const struct cpu_user_regs *regs)
 {
     static DEFINE_MCE_BARRIER(mce_trap_bar);
     static atomic_t severity_cpu = ATOMIC_INIT(-1);
+    static atomic_t found_error = ATOMIC_INIT(0);
+    static cpumask_t mce_fatal_cpus;
     struct mca_banks *bankmask = mca_allbanks;
     struct mca_banks *clear_bank = __get_cpu_var(mce_clear_banks);
     uint64_t gstatus;