Re: [PATCH] uio: User IRQ Mode

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Magnus Damm <magnus.damm@...>
Cc: Hans J. Koch <hjk@...>, Uwe Kleine-K?nig <Uwe.Kleine-Koenig@...>, linux-kernel@vger.kernel.org <linux-kernel@...>, gregkh@suse.de <gregkh@...>, akpm@linux-foundation.org <akpm@...>, lethal@linux-sh.org <lethal@...>, tglx@linutronix.de <tglx@...>
Date: Friday, July 4, 2008 - 9:26 am

On Fri, Jul 04, 2008 at 01:03:21PM +0900, Magnus Damm wrote:

Yes, I know such devices. If you _need_ to do it this way, it's simply
broken hardware design. You frequently find that in FPGAs designed by
industry amateurs. It can easily be handled by UIO as it is.

If you do it without need, then it's simply broken software design
because you use a kernel function which shows different behaviour on
different archs and machines where a simple hardware register access
would suffice.


That's why we have UIO, mainly to allow clean interrupt handling.


This is all possible with UIO as it is.


And if it were a solution that was machine- and platform-independent and
worked with all kinds of interrupts, there wouldn't be much objections.

BTW, you still need to touch kernel code to setup the structs for
uio_pdrv, or did I misunderstand something? So where's the advantage?


It's the difference between one write to a chip register compared to a
call to an arch specific kernel function. The performance and latency
issues might be negligible on some systems, but there's no guarantee. A
register access is one write on all platforms.


Drivers are always device specific. And disabling or masking an
interrupt in the way the chip designer wanted you to do it is the
fastest, most elegant, and most natural thing for a driver to do.


Your talking about the board you've got in front of you. I'm talking
about the UIO framework and the 20+ platforms it supports.


That's your personal experience.


Seems UIO gets tested intensively on SH at the moment :-)

Don't misunderstand me, even I can imagine cases where I _have_ to use
similar solutions. But that's no reason to patch it into the generic UIO
core. Because it should only be used if there's no other solution.
There's no point in inviting people to do it that way.


By replacing them with suboptimal generic handlers that work only in
special cases?


OK, I apologize for that statement.


I'm sure you get your vidix driver to work without this patch.


The concept of having a generic irq handler that works only with
non-shared interrupts.


You think I have some? Thank you ;-)


Thanks,
Hans

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

Messages in current thread:
[PATCH] uio: User IRQ Mode, Magnus Damm, (Wed Jul 2, 6:59 am)
Re: [PATCH] uio: User IRQ Mode, Hans J. Koch, (Wed Jul 2, 8:54 am)
Re: [PATCH] uio: User IRQ Mode, Uwe , (Thu Jul 3, 3:10 am)
Re: [PATCH] uio: User IRQ Mode, Hans J. Koch, (Thu Jul 3, 8:45 am)
Re: [PATCH] uio: User IRQ Mode, Magnus Damm, (Fri Jul 4, 12:03 am)
Re: [PATCH] uio: User IRQ Mode, Hans J. Koch, (Fri Jul 4, 9:26 am)
Re: [PATCH] uio: User IRQ Mode, Magnus Damm, (Fri Jul 4, 6:51 pm)
Re: [PATCH] uio: User IRQ Mode, Uwe , (Fri Jul 4, 2:01 am)
Re: [PATCH] uio: User IRQ Mode, Hans J. Koch, (Fri Jul 4, 9:32 am)
Re: [PATCH] uio: User IRQ Mode, Alan Cox, (Fri Jul 4, 4:16 am)
Re: [PATCH] uio: User IRQ Mode, Magnus Damm, (Fri Jul 4, 3:48 am)
Re: [PATCH] uio: User IRQ Mode, Uwe , (Fri Jul 4, 4:11 am)
Re: [PATCH] uio: User IRQ Mode, Paul Mundt, (Fri Jul 4, 4:29 am)
Re: [PATCH] uio: User IRQ Mode, Hans J. Koch, (Fri Jul 4, 9:39 am)
Re: [PATCH] uio: User IRQ Mode, Paul Mundt, (Thu Jul 3, 9:23 am)
Re: [PATCH] uio: User IRQ Mode, Hans J. Koch, (Thu Jul 3, 3:55 pm)
Re: [PATCH] uio: User IRQ Mode, Magnus Damm, (Thu Jul 3, 10:55 pm)
Re: [PATCH] uio: User IRQ Mode, Hans J. Koch, (Fri Jul 4, 8:44 am)
Re: [PATCH] uio: User IRQ Mode, Alan Cox, (Wed Jul 2, 7:11 am)
Re: [PATCH] uio: User IRQ Mode, Magnus Damm, (Thu Jul 3, 6:23 am)
Re: [PATCH] uio: User IRQ Mode, Uwe , (Wed Jul 2, 7:42 am)
Re: [PATCH] uio: User IRQ Mode, Alan Cox, (Wed Jul 2, 7:31 am)
Re: [PATCH] uio: User IRQ Mode, Magnus Damm, (Thu Jul 3, 1:11 am)