[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: interrupt handling w/o handler?
From:       Jamie Lokier <lkd () tantalophile ! demon ! co ! uk>
Date:       1999-07-12 15:56:05
[Download RAW message or body]

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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic