Call 64bit machine check through a call vector This would allow to plug in alternative machine check handlers like the old i386 mce code allowed. Right now this is just to interface to the i386 head.S code, although it is not strictly needed anymore because there will be only a single handler now. But let's keep it for now. Signed-off-by: Andi Kleen --- arch/x86/kernel/cpu/mcheck/mce_64.c | 3 +++ arch/x86/kernel/entry_64.S | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) Index: linux/arch/x86/kernel/cpu/mcheck/mce_64.c =================================================================== --- linux.orig/arch/x86/kernel/cpu/mcheck/mce_64.c +++ linux/arch/x86/kernel/cpu/mcheck/mce_64.c @@ -317,6 +317,9 @@ void do_machine_check(struct pt_regs * r atomic_dec(&mce_entry); } +void (*machine_check_vector)(struct pt_regs * regs, long error_code) = + do_machine_check; + #ifdef CONFIG_X86_MCE_INTEL /*** * mce_log_therm_throt_event - Logs the thermal throttling event to mcelog Index: linux/arch/x86/kernel/entry_64.S =================================================================== --- linux.orig/arch/x86/kernel/entry_64.S +++ linux/arch/x86/kernel/entry_64.S @@ -1154,7 +1154,7 @@ ENTRY(machine_check) INTR_FRAME pushq $0 CFI_ADJUST_CFA_OFFSET 8 - paranoidentry do_machine_check + paranoidentry *machine_check_vector(%rip) jmp paranoid_exit1 CFI_ENDPROC END(machine_check)