summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce.c
diff options
context:
space:
mode:
authorAndi Kleen2009-04-27 19:25:48 +0200
committerH. Peter Anvin2009-05-28 18:24:12 +0200
commit5d7279268b654d1f8ac43b0eb6cd9598d9cf55fd (patch)
tree6cfe2e8958506ff84e7ce61507e5555208938eae /arch/x86/kernel/cpu/mcheck/mce.c
parentx86, mce: port K7 bank 0 quirk to 64bit mce code (diff)
downloadkernel-qcow2-linux-5d7279268b654d1f8ac43b0eb6cd9598d9cf55fd.tar.gz
kernel-qcow2-linux-5d7279268b654d1f8ac43b0eb6cd9598d9cf55fd.tar.xz
kernel-qcow2-linux-5d7279268b654d1f8ac43b0eb6cd9598d9cf55fd.zip
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 @@
#include "mce.h"
+/* Handle unconfigured int18 (should never happen) */
+static void unexpected_machine_check(struct pt_regs *regs, long error_code)
+{
+ printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
+ smp_processor_id());
+}
+
+/* Call the installed machine check handler for this CPU setup. */
+void (*machine_check_vector)(struct pt_regs *, long error_code) =
+ unexpected_machine_check;
#ifdef CONFIG_X86_64
#define MISC_MCELOG_MINOR 227
@@ -715,6 +725,8 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
}
mce_cpu_quirks(c);
+ machine_check_vector = do_machine_check;
+
mce_init(NULL);
mce_cpu_features(c);
mce_init_timer();
@@ -1285,17 +1297,6 @@ int mce_disabled;
int nr_mce_banks;
EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */
-/* Handle unconfigured int18 (should never happen) */
-static void unexpected_machine_check(struct pt_regs *regs, long error_code)
-{
- printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
- smp_processor_id());
-}
-
-/* Call the installed machine check handler for this CPU setup. */
-void (*machine_check_vector)(struct pt_regs *, long error_code) =
- unexpected_machine_check;
-
/* This has to be run for each processor */
void mcheck_init(struct cpuinfo_x86 *c)
{