Issues an End of Interrupt (EOI) for a given handler.
int i_eoi(struct intr *handler)
The i_eoi kernel service allows a device driver to issue an End of Interrupt (EOI) for its device explicitly. For level-triggered interrupts, after the second level interrupt handler (SLIH) has completed, the kernel issues an EOI on behalf of the device driver. For ISA (8259) edge-triggered interrupts, the kernel issues the EOI on behalf of the device driver before calling the SLIH. However, in the case of some edge-triggered interrupts (for example, PCI and PCI-E style edge-triggered interrupt), it is desirable that the device driver checks for pending work before the EOI is issued, and the driver is required to check for any additional work after the EOI is issued. The i_eoi kernel service facilitates such operations and issues an EOI for an edge-triggered interrupt source. The i_eoi kernel service fails if called for a level-triggered interrupt source.
Item | Description |
---|---|
handler | Pointer to the interrupt handler |
The i_eoi kernel service can be called from process or interrupt environment.
INTR_SUCC if successful
INTR_FAIL if unsuccessful (the INTR_EDGE flag was not set on i_init()).
Parent CuDv "bus_id" VDEVICE bus BID
Device CuAt "bus_intr_lvl" Adapter interrupt level
intr.flags |= INTR_EDGE
intr.bus_type = BUS_BID
intr.bid = Parent_CuDv.bus_id
intr.level = Device_CuAt.bus_intr_lvl
PCI-E interrupts
are Message Signalled Interrupts, and hence, they are edge-triggered.
Therefore, INTR_EDGE flag should be specified.