Lost interrupts on SMP systems

John Baldwin jhb at FreeBSD.org
Tue Jan 18 10:39:05 PST 2005


On Tuesday 18 January 2005 01:18 pm, Peter Trifonov wrote:
> Hello John,
>
> > > Here is what it says:
> > > # ./inb 0x4d0
> > > inb(0x4d0) = 0x0 = 0d = '^@'
> > > # ./inb 0x4d1
> > > inb(0x4d1) = 0xe = 14d = '^N'
> >
> > Ok, this is good, it means you do have an ELCR.  Let me give you a
> > quick patch to try.  This will be relative to your existing mptable.c
> > file since i've committed the first mptable patch to current already.
>
> Thanks a lot!!!
> Now the box works perfectly!

Excellent.  Can you try this additional change and see if it still works or if 
it breaks things?  In past experience, ISA interrupts haven't ever been 
programmed as level/hi, but always either edge/hi or level/lo, so I want to 
try using lo polarity based on the ELCR as well.  (I'm trying to avoid 
possibly breaking other boxes in the field.)

---- //depot/user/jhb/acpipci/i386/i386/mptable.c#79
+++ /home/john/work/p4/acpipci/i386/i386/mptable.c
@@ -560,6 +560,13 @@
 	KASSERT(src_bus <= mptable_maxbusid, ("bus id %d too large", src_bus));
 	switch (busses[src_bus].bus_type) {
 	case ISA:
+#ifndef PC98
+		if (elcr_found &&
+		    elcr_read_trigger(src_bus_irq) == INTR_TRIGGER_LEVEL)
+			return (INTR_POLARITY_LOW);
+		else
+#endif
+			return (INTR_POLARITY_HIGH);
 	case EISA:
 		return (INTR_POLARITY_HIGH);
 	case PCI:

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the freebsd-smp mailing list