* Simulating level triggered interrupts with edges
@ 2011-06-22 19:50 Mark Brown
2011-06-22 21:32 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2011-06-22 19:50 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel
I've run into a couple of cases recently where a system has had a device
with a level triggered interrupt connected to an edge triggered
interrupt controller. Ignoring for the minute the hardware design
concerns one might have this strikes me as something I'd expect the
kernel to take a reasonable stab at handling in common code since it
should be possible to have the core simply call the level triggered
handler repeatedly until it returns IRQ_NONE when used with an edge
based interrupt. Obviously this leaves something to be desired but
something like this seems to be the most sensible way to deal with such
systems.
Is this supported by the current code? I can't see any such support but
that doesn't mean I'm not missing it. If it is not supported and I'm
not missing some much bigger problem with the idea can you make any
suggestions about the least bad way to allow systems to do this?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Simulating level triggered interrupts with edges
2011-06-22 19:50 Simulating level triggered interrupts with edges Mark Brown
@ 2011-06-22 21:32 ` Thomas Gleixner
2011-06-23 1:23 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2011-06-22 21:32 UTC (permalink / raw)
To: Mark Brown; +Cc: LKML, Russell King
On Wed, 22 Jun 2011, Mark Brown wrote:
> I've run into a couple of cases recently where a system has had a device
> with a level triggered interrupt connected to an edge triggered
> interrupt controller. Ignoring for the minute the hardware design
> concerns one might have this strikes me as something I'd expect the
> kernel to take a reasonable stab at handling in common code since it
> should be possible to have the core simply call the level triggered
> handler repeatedly until it returns IRQ_NONE when used with an edge
> based interrupt. Obviously this leaves something to be desired but
> something like this seems to be the most sensible way to deal with such
> systems.
>
> Is this supported by the current code? I can't see any such support but
> that doesn't mean I'm not missing it. If it is not supported and I'm
> not missing some much bigger problem with the idea can you make any
> suggestions about the least bad way to allow systems to do this?
No, we don't have support for this. Drivers should be careful about
such issues, but yes I can understand that we should think about
having support in the core code for such HW crap instead of cluttering
the drivers with such issues.
Though it's non-trivial. Think threaded interrupts, where we cannot
deal with that in handle_irq_edge(). I have no immediate idea how to
solve that at the core code, but feel free to have a stab.
Thanks,
tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Simulating level triggered interrupts with edges
2011-06-22 21:32 ` Thomas Gleixner
@ 2011-06-23 1:23 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-06-23 1:23 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, Russell King
On Wed, Jun 22, 2011 at 11:32:03PM +0200, Thomas Gleixner wrote:
> Though it's non-trivial. Think threaded interrupts, where we cannot
> deal with that in handle_irq_edge(). I have no immediate idea how to
> solve that at the core code, but feel free to have a stab.
Yes, that's why I asked - all the devices I care about have threaded
handlers and I care about a system where the interrupt controller is
threaded too. I was thinking error handling on set_type() and flags
but thought I must be missing something. I'll probably have a poke
sometime anyway.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-23 1:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22 19:50 Simulating level triggered interrupts with edges Mark Brown
2011-06-22 21:32 ` Thomas Gleixner
2011-06-23 1:23 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox