From patchwork Fri Nov 21 12:52:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5354611 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 E2783C11AC for ; Fri, 21 Nov 2014 12:55:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 19BAD20160 for ; Fri, 21 Nov 2014 12:55:44 +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 5EC1D2015D for ; Fri, 21 Nov 2014 12:55:43 +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 1XrniK-00055g-Hv; Fri, 21 Nov 2014 12:53:28 +0000 Received: from mail-pd0-x232.google.com ([2607:f8b0:400e:c02::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrniH-0004ER-PZ for linux-arm-kernel@lists.infradead.org; Fri, 21 Nov 2014 12:53:26 +0000 Received: by mail-pd0-f178.google.com with SMTP id g10so3056993pdj.9 for ; Fri, 21 Nov 2014 04:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=WBjmDaEu6cubazbtAWE+T/cjZNXbocVMSY8kWC+jto4=; b=oMufE1yBRgg4MJrqZ0q1KTA6KN12DQ9qxp9By2WqXKAwzs53GBr2xfWKBukPng7m5T YTBYY7QCFDheoy0VIDaaTwCcTXXx98J64hkLYcgoPJLyXwnN5CtH28saH3djmPc2STbZ p5U5i8w2OHW0PWFho/V3EYn7c/b6yehE63zfGjdDbp4D6U40Qf3uaYlsrUR6aXsU0Di9 Bjy5kh/s7ZYisgdIpn+q2WL9RALWtnbsCUUEk5Wp8CFq3CS6DA2mdcYosasT+BV0Lh/r NP0QpW2/EHKOMfhLkYMRnlBLAMt1od+zqtFVX1G2mJ+iY2UVtJKZKBDwTpPtKSm5Rdwb bn6A== X-Received: by 10.68.243.3 with SMTP id wu3mr6524717pbc.133.1416574383108; Fri, 21 Nov 2014 04:53:03 -0800 (PST) Received: from fangorn.rup.mentorg.com ([139.181.32.34]) by mx.google.com with ESMTPSA id rd8sm4805751pdb.58.2014.11.21.04.53.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Nov 2014 04:53:02 -0800 (PST) From: Dmitry Eremin-Solenikov To: Russell King Subject: [PATCH] ARM: warn if bad IRQ was scheduled Date: Fri, 21 Nov 2014 15:52:46 +0300 Message-Id: <1416574366-27182-1-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141121_045325_907049_96BD3370 X-CRM114-Status: GOOD ( 10.46 ) X-Spam-Score: -0.8 (/) Cc: linux-arm-kernel@lists.infradead.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=-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 If somebody causes an unexpected bad IRQ, this even will be unnoticed in both dmesg and system logs. If the "bad" IRQ is stuck, the device will just hang silently w/o reporting anything. Compare this to the generic behaviour (from include/asm-generic/hardirq.h) which prints a message with critical level. So to help everybody, include the same message into ARM-specific ack_bad_irq(). Signed-off-by: Dmitry Eremin-Solenikov --- arch/arm/include/asm/hw_irq.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h index a71b417..b1fa129 100644 --- a/arch/arm/include/asm/hw_irq.h +++ b/arch/arm/include/asm/hw_irq.h @@ -8,6 +8,7 @@ static inline void ack_bad_irq(int irq) { extern unsigned long irq_err_count; irq_err_count++; + printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq); } void set_irq_flags(unsigned int irq, unsigned int flags);