From patchwork Fri Nov 21 10:31:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 412995 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5BD4E140186 for ; Fri, 21 Nov 2014 21:34:37 +1100 (AEDT) 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 1XrlVY-0003KX-7t; Fri, 21 Nov 2014 10:32:08 +0000 Received: from mail-ie0-x22a.google.com ([2607:f8b0:4001:c03::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrlUt-0002mo-8Z for linux-arm-kernel@lists.infradead.org; Fri, 21 Nov 2014 10:31:28 +0000 Received: by mail-ie0-f170.google.com with SMTP id rd18so4671037iec.1 for ; Fri, 21 Nov 2014 02:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=cXsCBPQDk72hQ/gh89uEnTPuh4DY2Q0SB/2yqJi7ZUY=; b=eJdXD7oVPnQ7PDKh8psCe/i+KtRpgqj18LNVjgxRH+lWAPrrCCW7e1z8c26FRFtLUS nxh/gVMDsP3vomy0BcVN8BX8Uvl4akZ/od3VVr7xQnDfHFDxvz8UZkCYGXHD59aE+3fj ayPumbFBhzODU3dzbbzJnmn9Q4DTHr8QpT8D1n0A8G8MXiFeldFH+yuOKImCH190ML1i vqi73oq8aHhh1mCqhG7vCwt38cUjQzFT5puA8KylFhjlfCzcljgl8EkyRZSTMVjDizWT 3HAHUulr5n6+nRLOpVAL9PZLjr/NOI5+8k5tcZUv5RaSkV7J1AUtjd9nlhNflwLIxrvy zq6g== MIME-Version: 1.0 X-Received: by 10.50.61.140 with SMTP id p12mr14487458igr.34.1416565865900; Fri, 21 Nov 2014 02:31:05 -0800 (PST) Received: by 10.64.252.131 with HTTP; Fri, 21 Nov 2014 02:31:05 -0800 (PST) Date: Fri, 21 Nov 2014 14:31:05 +0400 Message-ID: Subject: IRQ #0 broken on ARM From: Dmitry Eremin-Solenikov To: linux-arm-kernel , Russell King - ARM Linux X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141121_023127_469037_B20D7EBA X-CRM114-Status: GOOD ( 17.55 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4001:c03:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dbaryshkov[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Cc: Marc Zyngier , Thomas Gleixner , Andrea Adami X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hello, After the commit a71b092a9c68685a270ebdde7b5986ba8787e575 (ARM: Convert handle_IRQ to use __handle_domain_irq) IRQ #0 is broken on ARM. It is a valid IRQ and it is quite imporant (on sa1100 it's a GPIO0). The worst thing is that the CPU will be stuck busy-looping around this IRQ w/o printing anything to the console or masking the irq. How should we cope with that? I'd like to propose to either revert the offending commit or to add the following patch. From e87f86497b796ed55fff644bbc75bf1890941829 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Fri, 21 Nov 2014 13:27:11 +0300 Subject: [PATCH] genirq: handle IRQ 0 in __handle_domain_irq __handle_domain_irq() function will ignore (well, report as bad) the IRQ number 0. On some platforms IRQ0 is bad IRQ. On others it is not. And while platforms are still in the process of converging to not using IRQ number 0 as a valid IRQ, I'd like to propose to use IRQ0 as a valid one in __handle_domain_irq(). Signed-off-by: Dmitry Eremin-Solenikov --- kernel/irq/irqdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index a1782f8..bfbeeb6 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -365,7 +365,7 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq, * Some hardware gives randomly wrong interrupts. Rather * than crashing, do something sensible. */ - if (unlikely(!irq || irq >= nr_irqs)) { + if (unlikely(irq >= nr_irqs)) { ack_bad_irq(irq); ret = -EINVAL; } else { -- 2.1.1