PERFORCE change 42358 for review
Peter Wemm
peter at FreeBSD.org
Fri Nov 14 11:10:56 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=42358
Change 42358 by peter at peter_daintree on 2003/11/14 11:10:16
re-add spurious interrupt detection
Affected files ...
.. //depot/projects/hammer/sys/amd64/isa/atpic.c#20 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/isa/atpic.c#20 (text+ko) ====
@@ -304,6 +304,22 @@
KASSERT(vec < ICU_LEN, ("unknown int %d\n", vec));
isrc = &atintrs[vec].at_intsrc;
+ if (vec == 7 || vec == 15) {
+ int port, isr;
+
+ /*
+ * Read the ISR register to see if IRQ 7/15 is really
+ * pending. Reset read register back to IRR when done.
+ */
+ port = ((struct atpic *)isrc->is_pic)->at_ioaddr;
+ mtx_lock_spin(&icu_lock);
+ outb(port, OCW3_SEL | OCW3_RR | OCW3_RIS);
+ isr = inb(port);
+ outb(port, OCW3_SEL | OCW3_RR);
+ mtx_unlock_spin(&icu_lock);
+ if ((isr & IRQ7) == 0)
+ return;
+ }
intr_execute_handlers(isrc, &iframe);
}
More information about the p4-projects
mailing list