The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey.org.uk>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [PATCH] fix broken machine check bits in 2.5.44-ac4
Date: Sun, 27 Oct 2002 13:45:16 +0000	[thread overview]
Message-ID: <20021027134516.GA17803@suse.de> (raw)

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

                 reply	other threads:[~2002-10-27 13:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021027134516.GA17803@suse.de \
    --to=davej@codemonkey.org.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox