Thread (15 messages) 15 messages, 4 authors, 2021-06-16

Re: [PATCH V3 1/3] gpio: Add virtio-gpio driver

From: Linus Walleij <hidden>
Date: 2021-06-15 20:03:41
Also in: linux-gpio, lkml

On Tue, Jun 15, 2021 at 1:15 PM Viresh Kumar [off-list ref] wrote:
I am now wondering how interrupts can be made to work here. Do you
have anything in mind for that ?
The aggregator does not aggregate interrupts only lines for now.
GPIO sysfs already supports interrupts, (...)
I hope that doesn't make you tempted to use sysfs to get interrupts,
those are awful, they use sysfs_notify_dirent() which means that
if two IRQs happen in  fast succession you will miss one of them
and think it was only one.

The GPIO character device supports low latency events forwarding
interrupts to userspace including QEMU & similar, timestamps the
events as close in time as possible to when they actually happen
(which is necessary for any kind of industrial control) and will never
miss an event if the hardware can register it. See:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/gpio/gpio-event-mon.c

Yours,
Linus Walleij
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help