From patchwork Wed Feb 11 08:20:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 5810831 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 28D839F39D for ; Wed, 11 Feb 2015 08:26:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5D2A520107 for ; Wed, 11 Feb 2015 08:26:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6572F200F3 for ; Wed, 11 Feb 2015 08:26:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLSaV-0001FK-Vg; Wed, 11 Feb 2015 08:24:00 +0000 Received: from mail-ie0-f169.google.com ([209.85.223.169]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLSaC-0000ax-FK for linux-arm-kernel@lists.infradead.org; Wed, 11 Feb 2015 08:23:42 +0000 Received: by ierx19 with SMTP id x19so2328244ier.3 for ; Wed, 11 Feb 2015 00:23:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=csTNK03Ei/iYr/cUb7M8xL7SyIUp2osGZ1Hk05rwIsE=; b=PoIFlsNWcnCJ9VtJ1Z8CMWnUw5nqWQnRu23qsBhoVft+L4enWUbQZpyKgm/q85EO51 o2QWsQXihV82q6PuBi/PIjXZHyCVgo+IrcnzO7TMjvwW4dcSLsugvpfCBZJKjqbFjajC 5X00G1RG8au1CpsNGYU7246EGHlYirYGqONI+dlgvOwXmf1vKB+IIn6rkpQHYawSupLE XQdGYmsFcW/DoRaLu16YuiytQyruVLOXsNjDXeC1rXDZn9wfZKh9FEjDsmvEpya2REQj eqrBr4sKtD/+cGYZNazCDdTmMIBYjrz9qP3ZqcXll74MDLUHoc4R3HHuzuvHpmAXZpyO ZN2A== X-Gm-Message-State: ALoCoQmQ+iJfHbHYgPNAk9Oo1oXgtndtLtm5mGE6Br0tZKh1OP47yNZM8/SDLsDSUaSyvTlnVw5G X-Received: by 10.50.67.100 with SMTP id m4mr28821430igt.22.1423642996412; Wed, 11 Feb 2015 00:23:16 -0800 (PST) Received: from gnx2579.solutionip.com ([113.28.134.59]) by mx.google.com with ESMTPSA id g11sm56703iod.28.2015.02.11.00.23.12 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Feb 2015 00:23:15 -0800 (PST) From: Eric Auger 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 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> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423642857-24240-1-git-send-email-eric.auger@linaro.org> References: <1423642857-24240-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150211_002340_618276_3EFD8D9A X-CRM114-Status: GOOD ( 10.51 ) X-Spam-Score: -0.7 (/) Cc: a.motakis@virtualopensystems.com, b.reynal@virtualopensystems.com, a.rigo@virtualopensystems.com, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);