ia64/xen-unstable

changeset 8558:8bcfcfc13e21

Factor re-enabling the IOCK line out of io_check_error()
and into a machine specific function to.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
author Ian.Campbell@xensource.com
date Wed Jan 11 15:51:18 2006 +0000 (2006-01-11)
parents c886f74b54a4
children c6f7774cae63
files linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c patches/linux-2.6.12/i386-mach-io-check-nmi.patch
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c	Wed Jan 11 12:02:54 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c	Wed Jan 11 15:51:18 2006 +0000
     1.3 @@ -506,18 +506,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("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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/linux-2.6.12/i386-mach-io-check-nmi.patch	Wed Jan 11 15:51:18 2006 +0000
     2.3 @@ -0,0 +1,43 @@
     2.4 +--- ref-linux-2.6.12/arch/i386/kernel/traps.c	2005-12-19 09:23:44.000000000 +0000
     2.5 ++++ linux-2.6.12-xen0/arch/i386/kernel/traps.c	2006-01-05 15:51:52.000000000 +0000
     2.6 +@@ -521,18 +521,11 @@
     2.7 + 
     2.8 + static void io_check_error(unsigned char reason, struct pt_regs * regs)
     2.9 + {
    2.10 +-	unsigned long i;
    2.11 +-
    2.12 + 	printk("NMI: IOCK error (debug interrupt?)\n");
    2.13 + 	show_registers(regs);
    2.14 + 
    2.15 + 	/* Re-enable the IOCK line, wait for a few seconds */
    2.16 +-	reason = (reason & 0xf) | 8;
    2.17 +-	outb(reason, 0x61);
    2.18 +-	i = 2000;
    2.19 +-	while (--i) udelay(1000);
    2.20 +-	reason &= ~8;
    2.21 +-	outb(reason, 0x61);
    2.22 ++	clear_io_check_error(reason);
    2.23 + }
    2.24 + 
    2.25 + static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
    2.26 +--- ref-linux-2.6.12/include/asm-i386/mach-default/mach_traps.h	2005-06-17 20:48:29.000000000 +0100
    2.27 ++++ linux-2.6.12-xen0/include/asm-i386/mach-default/mach_traps.h	2006-01-05 15:52:33.000000000 +0000
    2.28 +@@ -15,6 +15,18 @@
    2.29 + 	outb(reason, 0x61);
    2.30 + }
    2.31 + 
    2.32 ++static inline void clear_io_check_error(unsigned char reason)
    2.33 ++{
    2.34 ++	unsigned long i;
    2.35 ++
    2.36 ++	reason = (reason & 0xf) | 8;
    2.37 ++	outb(reason, 0x61);
    2.38 ++	i = 2000;
    2.39 ++	while (--i) udelay(1000);
    2.40 ++	reason &= ~8;
    2.41 ++	outb(reason, 0x61);
    2.42 ++}
    2.43 ++
    2.44 + static inline unsigned char get_nmi_reason(void)
    2.45 + {
    2.46 + 	return inb(0x61);