isa_wrongintr() cannot depend on the (void *) unit argument pointing to
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 11 Feb 2004 18:34:40 +0000 (18:34 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 11 Feb 2004 18:34:40 +0000 (18:34 +0000)
commitc475c75cc1274635dd023bf18cd057e0ecbc0aba
treec71e9f9adf1f7fdae1a4144187a6c877dcaeb575
parent2773cf71ce9e29517d438e3c20edeb0253ff146c
isa_wrongintr() cannot depend on the (void *) unit argument pointing to
a degenerate structure containing the irq, beacuse isa_wrongintr() is
called only when the wrong APIC vector is used vs the one we thought we
programmed.

This commit adjusts isa_wrongintr() to not depend on the unit argument,
fixing a crash that used to occur in the procedure.  It does not 'fix' the
interrupt routing bug responsible for causing the entry into isa_wrongintr(),
which is typically due to broken MP tables.  But at least the problem gets
reported.  FreeBSD-4.x just locks up without any error message in similar
situations.
sys/i386/isa/intr_machdep.c
sys/platform/pc32/isa/intr_machdep.c