Skip to content

Commit 45e5202

Browse files
charleskeepaxKAGA-KOKO
authored andcommitted
genirq: Add support for nested shared IRQs
On a specific audio system an interrupt input of an audio CODEC is used as a shared interrupt. That interrupt input is handled by a CODEC specific irq chip driver and triggers a CPU interrupt via the CODEC irq output line. The CODEC interrupt handler demultiplexes the CODEC interrupt inputs and the interrupt handlers for these demultiplexed inputs run nested in the context of the CODEC interrupt handler. The demultiplexed interrupts use handle_nested_irq() as their interrupt handler, which unfortunately has no support for shared interrupts. So the above hardware cannot be supported. Add shared interrupt support to handle_nested_irq() by iterating over the interrupt action chain. [ tglx: Massaged changelog ] Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Cc: patches@opensource.wolfsonmicro.com Link: http://lkml.kernel.org/r/1488904098-5350-1-git-send-email-ckeepax@opensource.wolfsonmicro.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 434fd63 commit 45e5202

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernel/irq/chip.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,10 @@ void handle_nested_irq(unsigned int irq)
348348
irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
349349
raw_spin_unlock_irq(&desc->lock);
350350

351-
action_ret = action->thread_fn(action->irq, action->dev_id);
351+
action_ret = IRQ_NONE;
352+
for_each_action_of_desc(desc, action)
353+
action_ret |= action->thread_fn(action->irq, action->dev_id);
354+
352355
if (!noirqdebug)
353356
note_interrupt(desc, action_ret);
354357

0 commit comments

Comments
 (0)