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: 5354171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B962C11AC for ; Fri, 21 Nov 2014 10:34:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA6BC20131 for ; Fri, 21 Nov 2014 10:34:13 +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 CF591200D4 for ; Fri, 21 Nov 2014 10:34:12 +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 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 (/) 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-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, 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 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