Messages in this thread | | | Date | Mon, 12 Jul 1999 17:56:05 +0200 | From | Jamie Lokier <> | Subject | Re: interrupt handling w/o handler? |
| |
Jeff Garzik wrote: > It seems to me that many drivers do not need a specific interrupt > handler, they simply use interrupts to wait until an event occurs. I > think a simple, generic interrupt handler that simply lets you know that > an event occurred would be very useful.
It really screws up other devices sharing the interrupt -- which is all the more likely with PCI, which has only 4 interrupt lines per bus.
As a matter of principle all interrupts are supposed to be acknowleged by telling the device it can finish asserting the irq -- for this, you need a device-specific interrupt handler. It can be very small but you do need it.
> Specifically in video drivers, one can do > > do { > status = read_fifo_register() & mask; > } while (!status); /* poll for fifo */ > > or.... > > interruptible_sleep_on_irq (video_irq); > /* FIFO is ready, proceed... */
Now admittedly it would be very cool if user-space video drivers could do this. Perhaps a generic user-interrupt driver where you give it the I/O or memory location to check (for valid interrupt) and the I/O or memory location & mask & value to write to acknowlege the interrupt.
I would imagine most devices fit that pattern.
-- Jamie
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |