aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2009-04-27 13:25:48 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-05-28 12:24:12 -0400
commit5d7279268b654d1f8ac43b0eb6cd9598d9cf55fd (patch)
tree6cfe2e8958506ff84e7ce61507e5555208938eae /arch/x86/kernel/cpu/mcheck/mce.c
parent2e6f694fde0a7158590e121962ca2e3c06633528 (diff)
x86, mce: use a call vector to call the 64bit mce handler
Allows to call different machine check handlers from the low level machine check entry vector. This is needed for later when it will be used for 32bit too. 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>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 1336280edcc2..d99318b470d8 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -39,6 +39,16 @@
39 39
40#include "mce.h" 40#include "mce.h"
41 41
42/* Handle unconfigured int18 (should never happen) */
43static void unexpected_machine_check(struct pt_regs *regs, long error_code)
44{
45 printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
46 smp_processor_id());
47}
48
49/* Call the installed machine check handler for this CPU setup. */
50void (*machine_check_vector)(struct pt_regs *, long error_code) =
51 unexpected_machine_check;
42#ifdef CONFIG_X86_64 52#ifdef CONFIG_X86_64
43 53
44#define MISC_MCELOG_MINOR 227 54#define MISC_MCELOG_MINOR 227
@@ -715,6 +725,8 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
715 } 725 }
716 mce_cpu_quirks(c); 726 mce_cpu_quirks(c);
717 727
728 machine_check_vector = do_machine_check;
729
718 mce_init(NULL); 730 mce_init(NULL);
719 mce_cpu_features(c); 731 mce_cpu_features(c);
720 mce_init_timer(); 732 mce_init_timer();
@@ -1285,17 +1297,6 @@ int mce_disabled;
1285int nr_mce_banks; 1297int nr_mce_banks;
1286EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */ 1298EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */
1287 1299
1288/* Handle unconfigured int18 (should never happen) */
1289static void unexpected_machine_check(struct pt_regs *regs, long error_code)
1290{
1291 printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
1292 smp_processor_id());
1293}
1294
1295/* Call the installed machine check handler for this CPU setup. */
1296void (*machine_check_vector)(struct pt_regs *, long error_code) =
1297 unexpected_machine_check;
1298
1299/* This has to be run for each processor */ 1300/* This has to be run for each processor */
1300void mcheck_init(struct cpuinfo_x86 *c) 1301void mcheck_init(struct cpuinfo_x86 *c)
1301{ 1302{