aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index f4d6841d2bdf..e193de44ef19 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -52,7 +52,7 @@ void (*machine_check_vector)(struct pt_regs *, long error_code) =
52 52
53int mce_disabled; 53int mce_disabled;
54 54
55#ifdef CONFIG_X86_64 55#ifdef CONFIG_X86_NEW_MCE
56 56
57#define MISC_MCELOG_MINOR 227 57#define MISC_MCELOG_MINOR 227
58 58
@@ -662,6 +662,21 @@ static void mce_cpu_quirks(struct cpuinfo_x86 *c)
662 } 662 }
663} 663}
664 664
665static void __cpuinit mce_ancient_init(struct cpuinfo_x86 *c)
666{
667 if (c->x86 != 5)
668 return;
669 switch (c->x86_vendor) {
670 case X86_VENDOR_INTEL:
671 if (mce_p5_enabled())
672 intel_p5_mcheck_init(c);
673 break;
674 case X86_VENDOR_CENTAUR:
675 winchip_mcheck_init(c);
676 break;
677 }
678}
679
665static void mce_cpu_features(struct cpuinfo_x86 *c) 680static void mce_cpu_features(struct cpuinfo_x86 *c)
666{ 681{
667 switch (c->x86_vendor) { 682 switch (c->x86_vendor) {
@@ -695,6 +710,11 @@ static void mce_init_timer(void)
695 */ 710 */
696void __cpuinit mcheck_init(struct cpuinfo_x86 *c) 711void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
697{ 712{
713 if (mce_disabled)
714 return;
715
716 mce_ancient_init(c);
717
698 if (!mce_available(c)) 718 if (!mce_available(c))
699 return; 719 return;
700 720
@@ -893,6 +913,10 @@ static struct miscdevice mce_log_device = {
893 */ 913 */
894static int __init mcheck_enable(char *str) 914static int __init mcheck_enable(char *str)
895{ 915{
916 if (*str == 0)
917 enable_p5_mce();
918 if (*str == '=')
919 str++;
896 if (!strcmp(str, "off")) 920 if (!strcmp(str, "off"))
897 mce_disabled = 1; 921 mce_disabled = 1;
898 else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog")) 922 else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
@@ -900,13 +924,13 @@ static int __init mcheck_enable(char *str)
900 else if (isdigit(str[0])) 924 else if (isdigit(str[0]))
901 get_option(&str, &tolerant); 925 get_option(&str, &tolerant);
902 else { 926 else {
903 printk(KERN_INFO "mce= argument %s ignored. Please use /sys\n", 927 printk(KERN_INFO "mce argument %s ignored. Please use /sys\n",
904 str); 928 str);
905 return 0; 929 return 0;
906 } 930 }
907 return 1; 931 return 1;
908} 932}
909__setup("mce=", mcheck_enable); 933__setup("mce", mcheck_enable);
910 934
911/* 935/*
912 * Sysfs support 936 * Sysfs support
@@ -1259,7 +1283,7 @@ static __init int mce_init_device(void)
1259 1283
1260device_initcall(mce_init_device); 1284device_initcall(mce_init_device);
1261 1285
1262#else /* CONFIG_X86_32: */ 1286#else /* CONFIG_X86_OLD_MCE: */
1263 1287
1264int nr_mce_banks; 1288int nr_mce_banks;
1265EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */ 1289EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */