[PATCH] i386, entry_32/mce: add do_machine_check

From: Alexander van Heukelum
Date: Wed May 20 2009 - 19:18:54 EST


A distinct pattern exists in the handler stubs for traps. The mce
is slightly different and that is not necessary. This adds an extra
indirection via a trivial C function and makes the assembly code
equivalent to the other trap stubs.

No functional change intended.

impact: prepare for introduction of zeroentry/errorentry macros

Signed-off-by: Alexander van Heukelum <heukelum@xxxxxxxxxxx>
---
arch/x86/kernel/cpu/mcheck/mce_32.c | 6 ++++++
arch/x86/kernel/entry_32.S | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_32.c b/arch/x86/kernel/cpu/mcheck/mce_32.c
index 3552119..b134ae6 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_32.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_32.c
@@ -30,6 +30,12 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
/* Call the installed machine check handler for this CPU setup. */
void (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check;

+/* Call the machine check vector */
+void do_machine_check(struct pt_regs *regs, long error_code)
+{
+ machine_check_vector(regs, error_code);
+}
+
/* This has to be run for each processor */
void mcheck_init(struct cpuinfo_x86 *c)
{
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 3b63eba..0e8ac16 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -932,7 +932,7 @@ ENTRY(machine_check)
RING0_INT_FRAME
pushl $0
CFI_ADJUST_CFA_OFFSET 4
- pushl machine_check_vector
+ pushl $do_machine_check
CFI_ADJUST_CFA_OFFSET 4
jmp error_code
CFI_ENDPROC
--
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/