Re: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts

Hans J. Koch
2008-05-24T22:20:57Z

On Fri, May 23, 2008 at 09:43:54PM -0700, Greg KH wrote:
> On Fri, May 23, 2008 at 01:55:57PM +0200, Hans J. Koch wrote:
> > Sometimes it is necessary to enable/disable the interrupt of a UIO device
> > from the userspace part of the driver. With this patch, the UIO kernel driver
> > can implement an "irqcontrol()" function that does this. Userspace can write
> > an s32 value to /dev/uioX (usually 0 or 1 to turn the irq off or on). The
> > UIO core will then call the driver's irqcontrol function.
>
> Why not just a new sysfs file for the uio device, irq_enabled, or
> something like that? That way our main read/write path is left alone.

Hi Greg,
this is in a fast path, so I'm not sure if a sysfs file is not too much
overhead. Special devices in embedded boards sometimes generate a
considerable irq load, and I think it might be problem to do a sysfs
write operation a few thousand times per second.

Thanks,
Hans