瀏覽代碼

x86, mce: rename 64bit mce_dont_init to mce_disabled

Give it the same name as on 32bit. This makes further merging easier.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Andi Kleen 16 年之前
父節點
當前提交
04b2b1a4df
共有 2 個文件被更改,包括 7 次插入10 次删除
  1. 0 2
      arch/x86/include/asm/mce.h
  2. 7 8
      arch/x86/kernel/cpu/mcheck/mce.c

+ 0 - 2
arch/x86/include/asm/mce.h

@@ -86,9 +86,7 @@ struct mce_log {
 
 
 #ifdef __KERNEL__
 #ifdef __KERNEL__
 
 
-#ifdef CONFIG_X86_32
 extern int mce_disabled;
 extern int mce_disabled;
-#endif
 
 
 #include <asm/atomic.h>
 #include <asm/atomic.h>
 
 

+ 7 - 8
arch/x86/kernel/cpu/mcheck/mce.c

@@ -49,14 +49,15 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
 /* Call the installed machine check handler for this CPU setup. */
 /* Call the installed machine check handler for this CPU setup. */
 void (*machine_check_vector)(struct pt_regs *, long error_code) =
 void (*machine_check_vector)(struct pt_regs *, long error_code) =
 						unexpected_machine_check;
 						unexpected_machine_check;
+
+int				mce_disabled;
+
 #ifdef CONFIG_X86_64
 #ifdef CONFIG_X86_64
 
 
 #define MISC_MCELOG_MINOR	227
 #define MISC_MCELOG_MINOR	227
 
 
 atomic_t mce_entry;
 atomic_t mce_entry;
 
 
-static int			mce_dont_init;
-
 /*
 /*
  * Tolerant levels:
  * Tolerant levels:
  *   0: always panic on uncorrected errors, log corrected errors
  *   0: always panic on uncorrected errors, log corrected errors
@@ -194,7 +195,7 @@ static void mce_panic(char *msg, struct mce *backup, u64 start)
 
 
 int mce_available(struct cpuinfo_x86 *c)
 int mce_available(struct cpuinfo_x86 *c)
 {
 {
-	if (mce_dont_init)
+	if (mce_disabled)
 		return 0;
 		return 0;
 	return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
 	return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
 }
 }
@@ -720,7 +721,7 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
 		return;
 		return;
 
 
 	if (mce_cap_init() < 0) {
 	if (mce_cap_init() < 0) {
-		mce_dont_init = 1;
+		mce_disabled = 1;
 		return;
 		return;
 	}
 	}
 	mce_cpu_quirks(c);
 	mce_cpu_quirks(c);
@@ -911,7 +912,7 @@ static struct miscdevice mce_log_device = {
  */
  */
 static int __init mcheck_disable(char *str)
 static int __init mcheck_disable(char *str)
 {
 {
-	mce_dont_init = 1;
+	mce_disabled = 1;
 	return 1;
 	return 1;
 }
 }
 __setup("nomce", mcheck_disable);
 __setup("nomce", mcheck_disable);
@@ -925,7 +926,7 @@ __setup("nomce", mcheck_disable);
 static int __init mcheck_enable(char *str)
 static int __init mcheck_enable(char *str)
 {
 {
 	if (!strcmp(str, "off"))
 	if (!strcmp(str, "off"))
-		mce_dont_init = 1;
+		mce_disabled = 1;
 	else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
 	else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
 		mce_bootlog = (str[0] == 'b');
 		mce_bootlog = (str[0] == 'b');
 	else if (isdigit(str[0]))
 	else if (isdigit(str[0]))
@@ -1292,8 +1293,6 @@ device_initcall(mce_init_device);
 
 
 #else /* CONFIG_X86_32: */
 #else /* CONFIG_X86_32: */
 
 
-int mce_disabled;
-
 int nr_mce_banks;
 int nr_mce_banks;
 EXPORT_SYMBOL_GPL(nr_mce_banks);	/* non-fatal.o */
 EXPORT_SYMBOL_GPL(nr_mce_banks);	/* non-fatal.o */