Re: Is it useful to support user level drivers

Abramo Bagnara
2001-06-21T16:36:46Z

"Dmitry A. Fedorov" wrote:
>
> On Thu, 21 Jun 2001, Oliver Neukum wrote:
>
> > > Lastly an IRQ kernel module can disable_irq() from interrupt handler
> > > and enable it again only on explicit acknowledge from user.
> >
> > Unless you need that interrupt to be enabled to deliver the signal or let
>
> Need not. Signal and other event delivery mechanisms has nothing
> common with disable/enable_irq().
>
> > userspace reenable the interrupt.
>
> "user acknowledge" is mean that.
>
> > In addition, how do you handle shared interrupts ?
>
> It is impossible, see my another message.

I don't see why you think it's impossible, the only thing you need is
that your kernel module know how to discriminate the interrupt source.

You can do this also with a irq.o module and other tiny modules that
register their irq source detection code.

Then you have /dev/irqX with the following API:

- ioctl(fd, IRQ_SUBSCRIBE, source_id);
- ioctl(fd, IRQ_ACK, source_id);
- poll
- async notification

Interrupts received between notification and acknowledge are queued
(i.e. counted). An alternative to queuing (user selectable) is to block
interrupt generation at hardware level in kernel space immediately
before notification.

I'm missing something?

--
Abramo Bagnara mailto:abramo@alsa-project.org

Opera Unica Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy

ALSA project http://www.alsa-project.org
It sounds good!