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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Magnus Damm
Date: Thursday, May 22, 2008 - 6:24 pm

Hi Hans,

On Fri, May 23, 2008 at 5:18 AM, Hans J. Koch <hjk@linutronix.de> wrote:

Thanks for your effort. I understand that you need to enable and
disable interrupts from user space, but that's a bit different from
what I want to do. I just want interrupts to be enabled before I do
read() or poll().

Also, adding the capability of disabling and enabling interrupts from
user space seems a bit error prone to me. Mainly since user space then
needs to know that the interrupt handler in kernel space can cope with
such changes. Not such a clean interface IMO. OTOH you may need that
to cope with some broken hardware.

But why does user space need to know if the auto-irq-enabling function
is there or not? If the user is interfacing to the wrong kernel UIO
driver with wrong behavior then he has obviously done something wrong.
Knowing if auto-irq-enabling is there from user space isn't going to
save users from themselves. They can and will mix and match things in
all sorts of wrong ways anyway.


I'm sure your patch or the ioctl suggestion both allow re-enabling
interrupts from user space. That's great, but both of them add extra
syscall overhead compared to my suggestion. They also make the user
space interface in user space part of the driver a bit more
complicated.

I do understand that you don't want to mess up your UIO kernel
callbacks by introducing just merging new ones all the time. OTOH, my
patch is just a few lines. Is introducing one extra syscall good
enough performance wise?

Thanks for your help!

/ magnus
--
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)