public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq: Fix handling of nested shared IRQs
@ 2017-03-06 16:08 Charles Keepax
  2017-03-06 18:05 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Keepax @ 2017-03-06 16:08 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, patches

When an IRQ is nested the nested handler is called directly from within the
threaded handler of the parent IRQ, however, the code in handle_nested_irq
only calls a single handler. This means when a shared IRQ is nested only
the first of the shared IRQ handlers will be run. This patch adds a loop
to move through and process all the handlers associated with the IRQ in
handle_nested_irq.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 kernel/irq/chip.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index be3c34e..c6c7f11 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -348,9 +348,12 @@ void handle_nested_irq(unsigned int irq)
 	irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
 	raw_spin_unlock_irq(&desc->lock);
 
-	action_ret = action->thread_fn(action->irq, action->dev_id);
-	if (!noirqdebug)
-		note_interrupt(desc, action_ret);
+	do {
+		action_ret = action->thread_fn(action->irq, action->dev_id);
+		if (!noirqdebug)
+			note_interrupt(desc, action_ret);
+		action = action->next;
+	} while (action);
 
 	raw_spin_lock_irq(&desc->lock);
 	irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-07  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-06 16:08 [PATCH] genirq: Fix handling of nested shared IRQs Charles Keepax
2017-03-06 18:05 ` Thomas Gleixner
2017-03-07  9:15   ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox