ia64/linux-2.6.18-xen.hg

changeset 8:aa96379da741

Imported patch i386-mach-io-check-nmi.patch from xen-unstable.hg 15200:bd3d6b4c52ec
author Ian Campbell <ian.campbell@xensource.com>
date Mon Jun 04 10:05:23 2007 +0100 (2007-06-04)
parents 18d84fce4960
children fac1f3836a60
files arch/i386/kernel/traps.c include/asm-i386/mach-default/mach_traps.h
line diff
     1.1 --- a/arch/i386/kernel/traps.c	Mon Jun 04 10:05:23 2007 +0100
     1.2 +++ b/arch/i386/kernel/traps.c	Mon Jun 04 10:05:23 2007 +0100
     1.3 @@ -642,18 +642,11 @@ static void mem_parity_error(unsigned ch
     1.4  
     1.5  static void io_check_error(unsigned char reason, struct pt_regs * regs)
     1.6  {
     1.7 -	unsigned long i;
     1.8 -
     1.9  	printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
    1.10  	show_registers(regs);
    1.11  
    1.12  	/* Re-enable the IOCK line, wait for a few seconds */
    1.13 -	reason = (reason & 0xf) | 8;
    1.14 -	outb(reason, 0x61);
    1.15 -	i = 2000;
    1.16 -	while (--i) udelay(1000);
    1.17 -	reason &= ~8;
    1.18 -	outb(reason, 0x61);
    1.19 +	clear_io_check_error(reason);
    1.20  }
    1.21  
    1.22  static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
     2.1 --- a/include/asm-i386/mach-default/mach_traps.h	Mon Jun 04 10:05:23 2007 +0100
     2.2 +++ b/include/asm-i386/mach-default/mach_traps.h	Mon Jun 04 10:05:23 2007 +0100
     2.3 @@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
     2.4  	outb(reason, 0x61);
     2.5  }
     2.6  
     2.7 +static inline void clear_io_check_error(unsigned char reason)
     2.8 +{
     2.9 +	unsigned long i;
    2.10 +
    2.11 +	reason = (reason & 0xf) | 8;
    2.12 +	outb(reason, 0x61);
    2.13 +	i = 2000;
    2.14 +	while (--i) udelay(1000);
    2.15 +	reason &= ~8;
    2.16 +	outb(reason, 0x61);
    2.17 +}
    2.18 +
    2.19  static inline unsigned char get_nmi_reason(void)
    2.20  {
    2.21  	return inb(0x61);