2 * mce.c - x86 Machine Check Exception Reporting
3 * (c) 2002 Alan Cox <alan@redhat.com>, Dave Jones <davej@codemonkey.org.uk>
6 #include <linux/init.h>
7 #include <linux/types.h>
8 #include <linux/kernel.h>
9 #include <linux/config.h>
10 #include <linux/module.h>
11 #include <linux/smp.h>
12 #include <linux/thread_info.h>
14 #include <asm/processor.h>
15 #include <asm/system.h>
22 EXPORT_SYMBOL_GPL(nr_mce_banks
); /* non-fatal.o */
24 /* Handle unconfigured int18 (should never happen) */
25 static fastcall
void unexpected_machine_check(struct pt_regs
* regs
, long error_code
)
27 printk(KERN_ERR
"CPU#%d: Unexpected int18 (Machine Check).\n", smp_processor_id());
30 /* Call the installed machine check handler for this CPU setup. */
31 void fastcall (*machine_check_vector
)(struct pt_regs
*, long error_code
) = unexpected_machine_check
;
33 /* This has to be run for each processor */
34 void mcheck_init(struct cpuinfo_x86
*c
)
39 switch (c
->x86_vendor
) {
41 if (c
->x86
==6 || c
->x86
==15)
45 case X86_VENDOR_INTEL
:
47 intel_p5_mcheck_init(c
);
49 intel_p6_mcheck_init(c
);
51 intel_p4_mcheck_init(c
);
54 case X86_VENDOR_CENTAUR
:
56 winchip_mcheck_init(c
);
64 static int __init
mcheck_disable(char *str
)
70 static int __init
mcheck_enable(char *str
)
76 __setup("nomce", mcheck_disable
);
77 __setup("mce", mcheck_enable
);