Commit 7614948a authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] generalise traps and nmi

parent abb2ed85
......@@ -51,6 +51,8 @@
#include <linux/irq.h>
#include <linux/module.h>
#include "mach_traps.h"
asmlinkage int system_call(void);
asmlinkage void lcall7(void);
asmlinkage void lcall27(void);
......@@ -58,6 +60,9 @@ asmlinkage void lcall27(void);
struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 },
{ 0, 0 }, { 0, 0 } };
/* Do we ignore FPU interrupts ? */
char ignore_fpu_irq = 0;
/*
* The IDT has to be page-aligned to simplify the Pentium
* F0 0F bug workaround.. We have a special link segment
......@@ -393,8 +398,7 @@ static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
printk("You probably have a hardware problem with your RAM chips\n");
/* Clear and disable the memory parity error line. */
reason = (reason & 0xf) | 4;
outb(reason, 0x61);
clear_mem_error(reason);
}
static void io_check_error(unsigned char reason, struct pt_regs * regs)
......@@ -431,7 +435,7 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
static void default_do_nmi(struct pt_regs * regs)
{
unsigned char reason = inb(0x61);
unsigned char reason = get_nmi_reason();
if (!(reason & 0xc0)) {
#if CONFIG_X86_LOCAL_APIC
......@@ -455,10 +459,7 @@ static void default_do_nmi(struct pt_regs * regs)
* Reassert NMI in case it became active meanwhile
* as it's edge-triggered.
*/
outb(0x8f, 0x70);
inb(0x71); /* dummy */
outb(0x0f, 0x70);
inb(0x71); /* dummy */
reassert_nmi();
}
static int dummy_nmi_callback(struct pt_regs * regs, int cpu)
......@@ -652,7 +653,7 @@ void math_error(void *eip)
asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code)
{
ignore_irq13 = 1;
ignore_fpu_irq = 1;
math_error((void *)regs->eip);
}
......@@ -709,7 +710,7 @@ asmlinkage void do_simd_coprocessor_error(struct pt_regs * regs,
{
if (cpu_has_xmm) {
/* Handle SIMD FPU exceptions on PIII+ processors. */
ignore_irq13 = 1;
ignore_fpu_irq = 1;
simd_math_error((void *)regs->eip);
} else {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment