Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)

Pavel Machek
2005-03-11T10:29:58Z

Hi!

> As many of you will be aware, we've been working on infrastructure for
> user-mode PCI and other drivers. The first step is to be able to
> handle interrupts from user space. Subsequent patches add
> infrastructure for setting up DMA for PCI devices.
>
> The user-level interrupt code doesn't depend on the other patches, and
> is probably the most mature of this patchset.

Okay, I like it; it means way easier PCI driver development.

But... how do you handle shared PCI interrupts?

> This patch adds a new file to /proc/irq/<nnn>/ called irq. Suitably
> privileged processes can open this file. Reading the file returns the
> number of interrupts (if any) that have occurred since the last read.
> If the file is opened in blocking mode, reading it blocks until
> an interrupt occurs. poll(2) and select(2) work as one would expect, to
> allow interrupts to be one of many events to wait for.
> (If you didn't like the file, one could have a special system call to
> return the file descriptor).

This should go into Documentation/ somewhere.
Pavel

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!