lkml.org 
[lkml]   [1999]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.039 / U:1.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site