Add NEWBUS infrastructure for interrupt enablement and disablement. This
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 23 May 2005 18:19:55 +0000 (18:19 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 23 May 2005 18:19:55 +0000 (18:19 +0000)
commit67a2436e79e68930cbe2d40ffd7b11c74c30cf48
tree8b711609262c5bdb87e6a4441820955b9095a364
parent90b7ba342359abf99fb6c56b796788f9ecac70de
Add NEWBUS infrastructure for interrupt enablement and disablement.  This
allows a device to indicate to the interrupt dispatch architecture that it
has enabled or disabled the device interrupt at the source.  The dispatch
will then decline to call the handler.   This is necessary because it is
possible for the interrupt handler to be called from the interrupt thread
AFTER the device has disabled the hard interrupt.   There are two cases:

    FIRST CASE:

* hard interrupt occurs
* interrupt thread is scheduled but cannot preempt
* device disables interrupt
* interrupt thread then runs handler while device believes interrupt to
  be disabled.

    SECOND CASE:

* multiple devices share the same interrupt (#1 and #2)
* device #1 interrupts and schedules the thread
* the handler for ALL devices is run, even if device #2 disabled
  its hard interrupt.

Clean up and simplify the interrupt vector code.  Always install a MUX
function.  The MUX function will check the handler enablement/disablement
state.
sys/i386/i386/nexus.c
sys/i386/isa/intr_machdep.c
sys/i386/isa/intr_machdep.h
sys/kern/bus_if.m
sys/kern/subr_bus.c
sys/platform/pc32/i386/nexus.c
sys/platform/pc32/isa/intr_machdep.c
sys/platform/pc32/isa/intr_machdep.h
sys/sys/bus.h