Skip to contentSkip to conversation

fix broken machine check bits in 2.5.44-ac4

PATCH New Dave Jones 1 participant 1 message Oct 27, 2002

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

PATCH 1/1 fix broken machine check bits in 2.5.44-ac4

This should do the trick for CONFIG_X86_MCE=n

arch/i386/kernel/cpu/Makefile +1 -1
diff -u linux-2.5/arch/i386/kernel/cpu/Makefile linux-2.5/arch/i386/kernel/cpu/Makefile
@@ -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/
arch/i386/kernel/cpu/common.c +2 -0
diff -u linux-2.5/arch/i386/kernel/cpu/common.c linux-2.5/arch/i386/kernel/cpu/common.c
@@ -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
arch/i386/kernel/cpu/mcheck/mce.c +0 -8
diff -u linux-2.5/arch/i386/kernel/cpu/mcheck/mce.c linux-2.5/arch/i386/kernel/cpu/mcheck/mce.c
@@ -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
arch/i386/kernel/traps.c +2 -0
diff -u linux-2.5/arch/i386/kernel/traps.c linux-2.5/arch/i386/kernel/traps.c
@@ -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);
arch/i386/kernel/entry.S +2 -0
@@ -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
Signature · 1 line
| Dave Jones.        http://www.codemonkey.org.uk