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: 5810791 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8FD42BF440 for ; Wed, 11 Feb 2015 08:23:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0EDF20107 for ; Wed, 11 Feb 2015 08:23:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE9EA200F3 for ; Wed, 11 Feb 2015 08:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbbBKIXR (ORCPT ); Wed, 11 Feb 2015 03:23:17 -0500 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) 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=BVJ5Ln1s4SupuJ1e6KN5W9rIGgJCBCa3kbR26mGZp9i7xfBb08L1vbEJes/CWT0qEV VosmjvCSx/PadD6254YGED4OsX0+CEHTmfDd1GU9SfGVuUnf/0qK7+oBc9X+tTUwYQJU iGtRLsL0K8jTmdlCfeoQJV5yIO19XqAG1p6v2/3okjgYB4b9PEilBo9CLFv4Qr/J45NH WidUFqEoE+tvIr0dBrYh1sfWkK9iInmpjYuPbmZ+vCKJ2QvQv8eIJQJYjuscHe3PY2GT GHk13QPgUJY9ampxfgX7KX5EW0VYiHRrxuuTcse1cFhszbu4LSesLT4M/BkxaVrio4va YRLg== X-Gm-Message-State: ALoCoQl7kFHIg9SIC8W5zX0o8XPIb196F2buFhT67JRy6j8v69cOUYXGRfVtXEJOI5WJuQXXsLeK 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 Cc: patches@linaro.org, a.motakis@virtualopensystems.com, a.rigo@virtualopensystems.com, b.reynal@virtualopensystems.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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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);