From patchwork Fri Nov 21 13:30: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: 5354831 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F166B9F1E1 for ; Fri, 21 Nov 2014 13:34:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 327282015D for ; Fri, 21 Nov 2014 13:34:14 +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 BD22920160 for ; Fri, 21 Nov 2014 13:34:08 +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 1XroIY-0003or-40; Fri, 21 Nov 2014 13:30:54 +0000 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XroIM-0003Z8-5b for linux-arm-kernel@lists.infradead.org; Fri, 21 Nov 2014 13:30:42 +0000 Received: by mail-wi0-f181.google.com with SMTP id r20so8856271wiv.8 for ; Fri, 21 Nov 2014 05:30:20 -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=L+TxwgzwCxUj6j958SLv29R1BRNkeStJmh25774ONNA=; b=NY4po83degdmVV9Tj8lQdW4pggwkpeXyNbCy0incU7jQZ0JGPfoUnKGCoQkSIlRhTQ PeAvlKMErkXfLyqgdtN6kxu0/e3e9cGt12yOa0L4GH5RYZEZxvm8k/pbElmY8V8d9+tt gQ391I5J8HOmyCxOi0iIfst0ZKiC0VGYi5HWV55FFHVgt79RrkHM7RvruSU6Uyb8n/Xi UsKXj9XyhBvknJXD9d1cKu/RKGBytIGqJmvOqVEtSAhVbdtySnuIzCQxOj/fOVZJ0nw/ LZ8EPU5GB51/uiZZDRgvVBdhlsE/iK0zUR6YhM5mYoMelUB+tjcGxqHLhAAxeiPW3TP1 RNYQ== X-Received: by 10.180.98.233 with SMTP id el9mr7896919wib.3.1416576619856; Fri, 21 Nov 2014 05:30:19 -0800 (PST) Received: from fangorn.rup.mentorg.com ([139.181.32.34]) by mx.google.com with ESMTPSA id dg7sm8758756wib.24.2014.11.21.05.30.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Nov 2014 05:30:18 -0800 (PST) From: Dmitry Eremin-Solenikov To: Russell King Subject: [PATCH V2] ARM: warn if bad IRQ was scheduled Date: Fri, 21 Nov 2014 16:30:05 +0300 Message-Id: <1416576605-31762-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_053042_517297_5ACFFF1A X-CRM114-Status: GOOD ( 10.56 ) 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..af79da4 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++; + pr_crit("unexpected IRQ trap at vector %02x\n", irq); } void set_irq_flags(unsigned int irq, unsigned int flags);