From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932784AbdCKMBY (ORCPT ); Sat, 11 Mar 2017 07:01:24 -0500 Received: from terminus.zytor.com ([65.50.211.136]:35402 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753959AbdCKMBQ (ORCPT ); Sat, 11 Mar 2017 07:01:16 -0500 Date: Sat, 11 Mar 2017 04:01:04 -0800 From: tip-bot for Charles Keepax Message-ID: Cc: ckeepax@opensource.wolfsonmicro.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, mingo@kernel.org, ckeepax@opensource.wolfsonmicro.com, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <1488904098-5350-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> References: <1488904098-5350-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq: Add support for nested shared IRQs Git-Commit-ID: 45e5202213ae6541f7916bb3c64fbcd3019ec473 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 45e5202213ae6541f7916bb3c64fbcd3019ec473 Gitweb: http://git.kernel.org/tip/45e5202213ae6541f7916bb3c64fbcd3019ec473 Author: Charles Keepax AuthorDate: Tue, 7 Mar 2017 16:28:18 +0000 Committer: Thomas Gleixner CommitDate: Sat, 11 Mar 2017 12:57:03 +0100 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 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 --- kernel/irq/chip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index be3c34e..686be4b 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -348,7 +348,10 @@ 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); + action_ret = IRQ_NONE; + for_each_action_of_desc(desc, action) + action_ret |= action->thread_fn(action->irq, action->dev_id); + if (!noirqdebug) note_interrupt(desc, action_ret);