Add a special check for a stray IRQ 7 or IRQ 15 to see if it is actually
a spurious interrupt from one of the 8259As. If so, don't log it as a stray IRQ, but just silently ignore it. Approved by: re (rwatson)
This commit is contained in:
parent
b9d42e49b0
commit
cd693b0bad
@ -343,6 +343,28 @@ atpic_handle_intr(struct intrframe iframe)
|
||||
KASSERT((uint)iframe.if_vec < ICU_LEN,
|
||||
("unknown int %d\n", iframe.if_vec));
|
||||
isrc = &atintrs[iframe.if_vec].at_intsrc;
|
||||
|
||||
/*
|
||||
* If we don't have an ithread, see if this is a spurious
|
||||
* interrupt.
|
||||
*/
|
||||
if (isrc->is_ithread == NULL &&
|
||||
(iframe.if_vec == 7 || iframe.if_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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user