[PATCH] fix broken machine check bits in 2.5.44-ac4

Dave Jones (davej@codemonkey.org.uk)
Sun, 27 Oct 2002 13:45:16 +0000


This should do the trick for CONFIG_X86_MCE=n

diff -u linux-2.5/arch/i386/kernel/cpu/Makefile linux-2.5/arch/i386/kernel/cpu/Makefile
--- linux-2.5/arch/i386/kernel/cpu/Makefile 2002-10-25 18:02:31.000000000 -0100
+++ linux-2.5/arch/i386/kernel/cpu/Makefile 2002-10-27 12:24:39.000000000 -0100
@@ -13,7 +13,7 @@
obj-y += nexgen.o
obj-y += umc.o

-obj-y += mcheck/
+obj-$(CONFIG_X86_MCE) += mcheck/

obj-$(CONFIG_MTRR) += mtrr/
obj-$(CONFIG_CPU_FREQ) += cpufreq/
diff -u linux-2.5/arch/i386/kernel/cpu/common.c linux-2.5/arch/i386/kernel/cpu/common.c
--- linux-2.5/arch/i386/kernel/cpu/common.c 2002-10-25 18:02:31.000000000 -0100
+++ linux-2.5/arch/i386/kernel/cpu/common.c 2002-10-27 12:24:39.000000000 -0100
@@ -354,7 +354,9 @@
boot_cpu_data.x86_capability[3]);

/* Init Machine Check Exception if available. */
+#ifdef CONFIG_X86_MCE
mcheck_init(c);
+#endif
}
/*
* Perform early boot up checks for a valid TSC. See arch/i386/kernel/time.c
diff -u linux-2.5/arch/i386/kernel/cpu/mcheck/mce.c linux-2.5/arch/i386/kernel/cpu/mcheck/mce.c
--- linux-2.5/arch/i386/kernel/cpu/mcheck/mce.c 2002-10-25 18:02:32.000000000 -0100
+++ linux-2.5/arch/i386/kernel/cpu/mcheck/mce.c 2002-10-27 12:24:39.000000000 -0100
@@ -13,8 +13,6 @@

#include "mce.h"

-#ifdef CONFIG_X86_MCE
-
int mce_disabled __initdata = 0;

/* Handle unconfigured int18 (should never happen) */
@@ -79,6 +77,0 @@
-
-#else
-asmlinkage void do_machine_check(struct pt_regs * regs, long error_code) {}
-asmlinkage void smp_thermal_interrupt(struct pt_regs regs) {}
-void __init mcheck_init(struct cpuinfo_x86 *c) {}
-#endif
diff -u linux-2.5/arch/i386/kernel/traps.c linux-2.5/arch/i386/kernel/traps.c
--- linux-2.5/arch/i386/kernel/traps.c 2002-10-25 18:02:31.000000000 -0100
+++ linux-2.5/arch/i386/kernel/traps.c 2002-10-27 12:24:39.000000000 -0100
@@ -916,7 +916,9 @@
set_trap_gate(15,&spurious_interrupt_bug);
set_trap_gate(16,&coprocessor_error);
set_trap_gate(17,&alignment_check);
+#ifdef CONFIG_X86_MCE
set_trap_gate(18,&machine_check);
+#endif
set_trap_gate(19,&simd_coprocessor_error);

set_system_gate(SYSCALL_VECTOR,&system_call);
--- bk-linus/arch/i386/kernel/entry.S 2002-10-20 20:21:21.000000000 -0100
+++ linux-2.5/arch/i386/kernel/entry.S 2002-10-27 12:24:39.000000000 -0100
@@ -471,10 +471,12 @@ ENTRY(page_fault)
pushl $do_page_fault
jmp error_code

+#ifdef CONFIG_X86_MCE
ENTRY(machine_check)
pushl $0
pushl $do_machine_check
jmp error_code
+#endif

ENTRY(spurious_interrupt_bug)
pushl $0

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