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