Re: [PATCH 01/03] uio: Add enable_irq() callback

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hans J. Koch
Date: Friday, May 23, 2008 - 1:43 am

Am Fri, 23 May 2008 10:24:42 +0900
schrieb "Magnus Damm" <magnus.damm@gmail.com>:


Are you sure this works cleanly? You usually do a read immediately
after poll, so you might get two interrupts when waiting with select().


No, it doesn't. If the kernel driver doesn't implement the irqcontrol()
handler, write attempts will return an error.


All of this talk is _only_ about broken hardware. Decent hardware has
seperate IRQ mask and status registers, in which case userspace has no
problems at all to deal with several internal interrupt sources of the
chip. We only need all this for chips where it is not possible to mask
an IRQ through a mappable register or (more often) where acknowledging
the interrupt also clears the status register so that userspace has no
way of knowing what the source of the interrupt was. The latter applies
only to chips with more than one internal irq source.


It doesn't, I just find it nice to have such a flag displayed in lsuio.


Agreed.


UIO deals with two things, device memory and interrupts. We have mmap()
for mem and read() for waiting for an irq. This looks clean and logical
to me:

1) mmap() => device memory
2) read()/write() => device irqs


This doesn't seem to be a problem, really. This write() is straight
forward, without any wait queues etc, so what?

Thanks,
Hans

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/03][RFC] Reusable UIO Platform Driver, Magnus Damm, (Tue May 20, 3:51 am)
[PATCH 01/03] uio: Add enable_irq() callback, Magnus Damm, (Tue May 20, 3:51 am)
[PATCH 02/03] uio: Add uio_platform driver, Magnus Damm, (Tue May 20, 3:51 am)
Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver, Hans J. Koch, (Tue May 20, 2:07 pm)
Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver, Magnus Damm, (Tue May 20, 8:31 pm)
Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver, Paul Mundt, (Wed May 21, 12:49 am)
Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver, Magnus Damm, (Wed May 21, 1:09 am)
Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver, Magnus Damm, (Wed May 21, 1:22 am)
Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver, Magnus Damm, (Wed May 21, 3:50 am)
Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver, Magnus Damm, (Wed May 21, 4:56 am)
Re: [PATCH 01/03] uio: Add enable_irq() callback, Magnus Damm, (Wed May 21, 4:58 am)
Re: [PATCH 01/03] uio: Add enable_irq() callback, Hans J. Koch, (Thu May 22, 1:18 pm)
Re: [PATCH 01/03] uio: Add enable_irq() callback, Magnus Damm, (Thu May 22, 6:24 pm)
Re: [PATCH 01/03] uio: Add enable_irq() callback, Hans J. Koch, (Fri May 23, 1:43 am)