Re: Interrupts for userspace

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Tue, 14 Sep 1999 20:31:39 +0200


Hi!

> > Sorry. I of course wanted _interrupts_ to be delivered to
> > userspace. The code to do so (I believe it was chardevice) was already
> > posted to l-k but I can not find it :-(... I do not want to reinvent
> > the wheel.
>
> You cant do it for PCI. You have to write a custom irq handler that does
> all that is needed to clear the IRQ then posts something out

BTW why not? Assuming shared interrupts:

IRQ cames,

my driver blocks interrupt and tells userspace

userspace notices it is not its interrupt and tells kernel

kernel unblocks and sends interrupt to next driver in chain

As long as you don't share interrupt with disk driver (or if you have
userspace driver pagelocked), there will not be deadlocks.

Of course it will be dog slow. It will introduce incredible
latencies. But it might even work.

Pavel

-- 
The best software in life is free (not shareware)!		Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

- 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/