From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Auger Subject: [RFC v2 1/4] chip.c: complete the forwarded IRQ in case the handler is not reached Date: Wed, 11 Feb 2015 09:20:54 +0100 Message-ID: <1423642857-24240-2-git-send-email-eric.auger@linaro.org> References: <1423642857-24240-1-git-send-email-eric.auger@linaro.org> Cc: patches@linaro.org, a.motakis@virtualopensystems.com, a.rigo@virtualopensystems.com, b.reynal@virtualopensystems.com To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, andre.przywara@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, alex.williamson@redhat.com Return-path: Received: from mail-ie0-f174.google.com ([209.85.223.174]:42217 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751394AbbBKIXR (ORCPT ); Wed, 11 Feb 2015 03:23:17 -0500 Received: by iery20 with SMTP id y20so2270780ier.9 for ; Wed, 11 Feb 2015 00:23:16 -0800 (PST) In-Reply-To: <1423642857-24240-1-git-send-email-eric.auger@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: With current handle_fasteoi_irq implementation, in case irqd_irq_disabled is true (disable_irq was called) or !irq_may_run, the IRQ is not completed. Only the running priority is dropped. IN those cases, the IRQ will never be forwarded and hence will never be deactivated by anyone else. Signed-off-by: Eric Auger --- kernel/irq/chip.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 2f9571b..f12cce6 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -561,8 +561,12 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) raw_spin_unlock(&desc->lock); return; out: - if (!(chip->flags & IRQCHIP_EOI_IF_HANDLED)) - eoi_irq(desc, chip); + if (!(chip->flags & IRQCHIP_EOI_IF_HANDLED)) { + if (chip->irq_priority_drop) + chip->irq_priority_drop(&desc->irq_data); + if (chip->irq_eoi) + chip->irq_eoi(&desc->irq_data); + } raw_spin_unlock(&desc->lock); } EXPORT_SYMBOL_GPL(handle_fasteoi_irq); -- 1.9.1