Return the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot
find any unmasked pin with an interrupt asserted. Reviewed by: tychon CR: https://reviews.freebsd.org/D669 MFC after: 1 week
This commit is contained in:
parent
acc1741c58
commit
7a244722d1
@ -500,13 +500,19 @@ vatpic_pending_intr(struct vm *vm, int *vecptr)
|
|||||||
VATPIC_LOCK(vatpic);
|
VATPIC_LOCK(vatpic);
|
||||||
|
|
||||||
pin = vatpic_get_highest_irrpin(atpic);
|
pin = vatpic_get_highest_irrpin(atpic);
|
||||||
if (pin == -1)
|
|
||||||
pin = 7;
|
|
||||||
if (pin == 2) {
|
if (pin == 2) {
|
||||||
atpic = &vatpic->atpic[1];
|
atpic = &vatpic->atpic[1];
|
||||||
pin = vatpic_get_highest_irrpin(atpic);
|
pin = vatpic_get_highest_irrpin(atpic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If there are no pins active at this moment then return the spurious
|
||||||
|
* interrupt vector instead.
|
||||||
|
*/
|
||||||
|
if (pin == -1)
|
||||||
|
pin = 7;
|
||||||
|
|
||||||
|
KASSERT(pin >= 0 && pin <= 7, ("%s: invalid pin %d", __func__, pin));
|
||||||
*vecptr = atpic->irq_base + pin;
|
*vecptr = atpic->irq_base + pin;
|
||||||
|
|
||||||
VATPIC_UNLOCK(vatpic);
|
VATPIC_UNLOCK(vatpic);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user