Re: [2.3.99pre2] [CORRUPTION] Doh! Corruption problems again...

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Thu Mar 23 2000 - 10:56:40 EST


Manfred Spraul wrote:
>
> Andre Hedrick wrote:
> >
> >
> > CONFIG_PIIX_TUNING ????
> >
> Ops.
>
> I added CONFIG_PIIX_TUNING, and nothing changed.
>

Andre, I'm fairly certain that the IDE driver is not the root of the
problem:
When the IDE driver reports "interrupt lost", that interrupt is actually
hanging in the i8259! I dumped the IRR [interrupt request register], the
irq 14 is waiting, its just not delivered to the cpu 8)

Could everyone with interrupt lost messages try the attached patch?
It changes the EOI sequence, but I only tested it one one motherboard.

I've also attached my debug patch [patch-sysrq]

--
	Manfred

--- 2.3/arch/i386/kernel/i8259.c Fri Mar 3 00:40:58 2000 +++ build-2.3/arch/i386/kernel/i8259.c Thu Mar 23 16:30:12 2000 @@ -292,12 +292,12 @@ if (irq & 8) { inb(0xA1); /* DUMMY - (do we need this?) */ outb(cached_A1,0xA1); + outb(0x60+(irq&7),0xA0);/* 'Specific EOI' to slave */ outb(0x62,0x20); /* 'Specific EOI' to master-IRQ2 */ - outb(0x20,0xA0); /* 'generic EOI' to slave */ } else { inb(0x21); /* DUMMY - (do we need this?) */ outb(cached_21,0x21); - outb(0x20,0x20); /* 'generic EOI' to master */ + outb(0x60+irq,0x20); /* 'Specific EOI' to master */ } spin_unlock_irqrestore(&i8259A_lock, flags); return;

--- 2.3/drivers/char/sysrq.c Mon Mar 20 15:11:26 2000 +++ build-2.3/drivers/char/sysrq.c Thu Mar 23 16:29:48 2000 @@ -54,7 +54,9 @@ * This function is called by the keyboard handler when SysRq is pressed * and any other keycode arrives. */ - +#include <asm/io.h> +#include <asm/irq.h> +#include <linux/irq.h> void handle_sysrq(int key, struct pt_regs *pt_regs, struct kbd_struct *kbd, struct tty_struct *tty) { @@ -131,6 +133,28 @@ printk("Kill ALL Tasks (even init)\n"); send_sig_all(SIGKILL, 1); orig_log_level = 8; + break; + case 'q': + { + int isr2, isr1; + printk("irq status for irq 14:"); + printk(" status %lxh.\n", irq_desc[14].status); + local_irq_disable(); + outb(0x0B,0xA0); /* ISR register */ + isr2 = inb(0xA0); + outb(0x0A,0xA0); /* back to the IRR register */ + + outb(0x0B,0x20); /* ISR register */ + isr1 = inb(0x20); + outb(0x0A,0x20); /* back to the IRR register */ + local_irq_disable(); + printk(" isr1: %xh, isr2: %xh.\n", + isr1, isr2); + printk(" mask1: %xh, mask2: %xh.\n", + inb(0x21), inb(0xa1)); + printk(" irr1 %xh, irr2: %xh.\n", + inb(0x20), inb(0xa0)); + } break; default: /* Unknown: help */ if (kbd)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:38 EST