* [PATCH] cbus-retu: Fix nested IRQ handling
@ 2011-02-27 17:17 Michael Buesch
2011-02-28 8:36 ` Felipe Balbi
0 siblings, 1 reply; 3+ messages in thread
From: Michael Buesch @ 2011-02-27 17:17 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Felipe Balbi, linux-omap
handle_nested_irq() expects a global IRQ number, so
the irq_base has to be added to the RETU irq number.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
Index: linux-omap-2.6/drivers/cbus/retu.c
===================================================================
--- linux-omap-2.6.orig/drivers/cbus/retu.c 2011-02-27 18:12:41.147193710 +0100
+++ linux-omap-2.6/drivers/cbus/retu.c 2011-02-27 18:13:23.383428594 +0100
@@ -205,7 +205,7 @@ static irqreturn_t retu_irq_handler(int
return IRQ_NONE;
}
- for (i = 0; idr != 0; i++, idr >>= 1) {
+ for (i = retu->irq_base; idr != 0; i++, idr >>= 1) {
if (!(idr & 1))
continue;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cbus-retu: Fix nested IRQ handling
2011-02-27 17:17 [PATCH] cbus-retu: Fix nested IRQ handling Michael Buesch
@ 2011-02-28 8:36 ` Felipe Balbi
2011-02-28 14:16 ` Michael Büsch
0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2011-02-28 8:36 UTC (permalink / raw)
To: Michael Buesch; +Cc: Tony Lindgren, Felipe Balbi, linux-omap
On Sun, Feb 27, 2011 at 06:17:01PM +0100, Michael Buesch wrote:
> handle_nested_irq() expects a global IRQ number, so
> the irq_base has to be added to the RETU irq number.
>
> Signed-off-by: Michael Buesch <mb@bu3sch.de>
Good catch, while at that, could you also cook another patch to add
locking on retu_irq_handler ? We are using the internal lockless
version of the read/write functions, so we need to hold the mutex before
reading/writing to avoid problems.
--
balbi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cbus-retu: Fix nested IRQ handling
2011-02-28 8:36 ` Felipe Balbi
@ 2011-02-28 14:16 ` Michael Büsch
0 siblings, 0 replies; 3+ messages in thread
From: Michael Büsch @ 2011-02-28 14:16 UTC (permalink / raw)
To: balbi; +Cc: Tony Lindgren, linux-omap
On Mon, 2011-02-28 at 10:36 +0200, Felipe Balbi wrote:
> On Sun, Feb 27, 2011 at 06:17:01PM +0100, Michael Buesch wrote:
> > handle_nested_irq() expects a global IRQ number, so
> > the irq_base has to be added to the RETU irq number.
> >
> > Signed-off-by: Michael Buesch <mb@bu3sch.de>
>
> Good catch, while at that, could you also cook another patch to add
> locking on retu_irq_handler ? We are using the internal lockless
> version of the read/write functions, so we need to hold the mutex before
> reading/writing to avoid problems.
Ok, it probably is safe without locking (due to the reads being atomic),
but I agree that it's more robust to add some locking here. I'll send
a patch.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-28 14:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-27 17:17 [PATCH] cbus-retu: Fix nested IRQ handling Michael Buesch
2011-02-28 8:36 ` Felipe Balbi
2011-02-28 14:16 ` Michael Büsch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox