Major cleanup of the interrupt registration subsystem.
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 13 Oct 2005 00:02:48 +0000 (00:02 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 13 Oct 2005 00:02:48 +0000 (00:02 +0000)
commit477d3c1cb94fc723c033f6ad0897a6a3d65046b6
treee4d1ead62c4852f4cb73526f26fde4549c57d12d
parented9037d78772b9065f017a866c125b553be1c3d8
Major cleanup of the interrupt registration subsystem.

* Collapse the separate registrations in the kernel interrupt thread and
  i386 layers into a single machine-independant kernel interrupt thread layer
  in kern/kern_intr.c.  Get rid of the i386 layer's 'MUX' code entirely.

* Have the interrupt vector assembly code (icu_vector.s and apic_vector.s)
  call a machine-independant function in the kernel interrupt thread
  layer to figure out how to process an interrupt.

* Move a lot of assembly into the new C interrupt processing function.

* Add support for INTR_MPSAFE.  If a device driver registers an interrupt
  as being MPSAFE, the Big Giant Lock will not be obtained or required.

* Temporarily just schedule the ithread if a FAST interrupt cannot be executed
  due to its serializer being locked.

* Add LWKT serialization support for a non-blocking 'try' function.

* Get rid of ointhand2_t and adjust all old ISA code to use inthand2_t.

* Supply a frame pointer as a pointer rather then embedding it on th stack.

* Allow FAST and SLOW interrupts to be mixed on the same IRQ, though this
  will not necessarily result in optimal operation.

* Remove direct APIC/ICU vector calls from the apic/icu vector assembly code.
  Everything goes through the new routine in kern/kern_intr.c now.

* Add a new flag, INTR_NOPOLL.  Interrupts registered with the flag will
  not be polled by the upcoming emergency general interrupt polling
  sysctl (e.g. ATA cannot be safely polled due to the way ATA register
  access interferes with ATA DMA).

* Remove most of the distinction in the i386 assembly layers between FAST
  and SLOW interrupts (part 1/2).

* Revamp the interrupt name array returned to userland to list multiple
  drivers associated with the same IRQ.
48 files changed:
sys/bus/cam/cam_xpt.c
sys/bus/isa/i386/isa_device.h
sys/cpu/i386/include/atomic.h
sys/dev/disk/ata/ata-all.c
sys/dev/disk/mcd/mcd.c
sys/dev/disk/wt/wt.c
sys/dev/misc/labpc/labpc.c
sys/dev/misc/spigot/spigot.c
sys/dev/misc/tw/tw.c
sys/dev/netif/cx/if_cx.c
sys/dev/netif/el/if_el.c
sys/dev/netif/ie/if_ie.c
sys/dev/netif/le/if_le.c
sys/dev/serial/cy/cy.c
sys/dev/serial/rc/rc.c
sys/dev/serial/sio/sio.c
sys/dev/serial/stl/stallion.c
sys/i386/apic/apic_vector.s
sys/i386/i386/nexus.c
sys/i386/i386/vm_machdep.c
sys/i386/icu/icu_vector.s
sys/i386/include/atomic.h
sys/i386/isa/apic_vector.s
sys/i386/isa/asc.c
sys/i386/isa/clock.c
sys/i386/isa/icu_vector.s
sys/i386/isa/intr_machdep.c
sys/i386/isa/intr_machdep.h
sys/i386/isa/vector.s
sys/kern/kern_intr.c
sys/kern/lwkt_serialize.c
sys/kern/subr_taskqueue.c
sys/opencrypto/crypto.c
sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/i386/nexus.c
sys/platform/pc32/i386/vm_machdep.c
sys/platform/pc32/icu/icu_vector.s
sys/platform/pc32/isa/apic_vector.s
sys/platform/pc32/isa/asc.c
sys/platform/pc32/isa/clock.c
sys/platform/pc32/isa/icu_vector.s
sys/platform/pc32/isa/intr_machdep.c
sys/platform/pc32/isa/intr_machdep.h
sys/platform/pc32/isa/vector.s
sys/sys/bus.h
sys/sys/interrupt.h
sys/sys/serialize.h
sys/sys/thread.h