From patchwork Fri Dec 18 14:31:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93BE7C4361B for ; Fri, 18 Dec 2020 14:35:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63CDF23A84 for ; Fri, 18 Dec 2020 14:35:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728060AbgLROfP (ORCPT ); Fri, 18 Dec 2020 09:35:15 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:44739 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727894AbgLROfN (ORCPT ); Fri, 18 Dec 2020 09:35:13 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MNKuI-1kSfN03xpi-00OoTh; Fri, 18 Dec 2020 15:31:41 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 01/23] kernel: irq: irqdescs: warn on spurious IRQ Date: Fri, 18 Dec 2020 15:31:00 +0100 Message-Id: <20201218143122.19459-2-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:LV+vlieoH9S7FVeRD54ZyNGq0lXxd7A7eeGG73dV5SKsuNXUfZI t5Tc1dALRs2AtPOwYKoApPnoyxW7/Lxyitn6jmEk7odPc1fXKRQf1B17b0Xo7GSaZpMx5dW TGMTjUj10cvONDT+2jdjeydrLJOMscAH46e6N0Uv313zK0Un9DMFeG3NocxtaL9uYHwBWUE aSQQOOS63nbzmSA0OZCyw== X-UI-Out-Filterresults: notjunk:1; V03:K0:+jizveWrAag=:xi1E+afKqBPbuitFr74tH/ Pqa93R1CfB6VGpKCdCeA3imHCGUzmR1wu1gjA3PGPF+dMp9C4DR3rt99LswhF1TegW/RnTDot 7d+qHzUK0gNbP/ybW7PGmodvcbOApL7/3hR0HaBIPYze29okX0qVKNaN0uUOc0aMPNrJm/lHf rCFjulnbgKj9sYd2ill1azgaxbVSkzVmRlEPbAXZ+0ALMS8qEDGet+OtJmWpacsNa46vQXnQR mVE6jRttoXsNQa2wg7diSy8ElyG3YIRCwJEWAPOcEpIC4aPBtfkksUoly5a7/5EKCc4EvuICg YHQlmrQSz8cwd325SSQ2jSl5oaE8TxRVgzjar1+yw/FjC2rs1pHYfkD4L/u2NKSTYhAEHWZqD //Tdu1h6FpFg7G/m1MYCJBESvLEx03W/xk08EHJHT4hVa+Y58QzG42CuKoHzR Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add a warning on spurious IRQs to __handle_domain_irq(), also telling the linux IRQ number (if any), the hw IRQ number and the max nr of IRQs. That's far more informative than the warnings in (some of) the individual arch's ack_bad_irq()'s. These aren't really helpful since either the other callers already had printed more detailed information or (when called by __handle_domain_irq()) the printout just doesn't tell anything useful. Signed-off-by: Enrico Weigelt, metux IT consult --- kernel/irq/irqdesc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index e810eb9906ea..62a381351775 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -681,6 +681,9 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq, * than crashing, do something sensible. */ if (unlikely(!irq || irq >= nr_irqs)) { + if (printk_ratelimit()) + pr_warn("spurious IRQ: irq=%d hwirq=%d nr_irqs=%d\n", + irq, hwirq, nr_irqs); ack_bad_irq(irq); ret = -EINVAL; } else { From patchwork Fri Dec 18 14:31:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89298C352B3 for ; Fri, 18 Dec 2020 14:37:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62B6C23AAA for ; Fri, 18 Dec 2020 14:37:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbgLROfN (ORCPT ); Fri, 18 Dec 2020 09:35:13 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:42439 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727836AbgLROfJ (ORCPT ); Fri, 18 Dec 2020 09:35:09 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MPXpS-1kUsIP1N8E-00MbYH; Fri, 18 Dec 2020 15:31:43 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 02/23] arch: alpha: drop misleading warning on spurious IRQ Date: Fri, 18 Dec 2020 15:31:01 +0100 Message-Id: <20201218143122.19459-3-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:pUJzS/tNjFJ37SufUPmB6VHWpKthVZUGxvQ+xKtdprNr8l6YI/1 KtXA5HiAMRvqC4e/n10rheKKOjnn6zs1jeHwcJ76JSfq/uaXTL12yjWHrsp+aEn4sFIwxGT lJtCDGmWiqtjf5DzjgjVtAXh0OE9P2QTM6JEU0+jDRqoh4w+LQlvJQkqtSE/m7lPjEpULQY EPZQOPAseqzUM9KoALtEw== X-UI-Out-Filterresults: notjunk:1; V03:K0:ImHgQfa9yos=:RMkUA47rpXzNJoIXDG7cLd bTIMK4FppxwMKyK22fDhDPRoT6ptco+6GEFPygCKPM3rqApxb1zc8N2Q9IlzRZztk4Mqspi6D EuSQLV7z2fEh8QrWp3rs7OPAeetvZb6aDKXn9A7Ga1rUJ1jEzmR/49pLCF7uhaFPSEWVS1iCL suvxGUV2sYC9MxuGtuiAG+MWMMbD9qXO8zYXwkujMFVcxMcyH8TmHBCIhoqZ3IdyhU1uYZEd8 2WqgQk85s0gjS0zLWzGGRKzEC1JigGxQf0B8WdHUmSJh1LFYUVom4P2AHZw+H6DArC2p5KOxz x+JqeuLY6uvPHlbVff8Ida8an42pyFx/Dwg6qSQ6w/WH6zt9hco0jJg3PoOelM+wOibrEGeUY weYR0zzUBTrMjLce4GumPryxUSHszmfx7+lOptoiMHwpwf+pVLRG6INWMbNJW Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The warning in ack_bad_irq() is misleading in several ways: * the term "vector" isn't quite correct * the printing format isn't consistent across the archs: some print decimal, some hex, some hex w/o 0x prefix. * the printed linux irq isn't meaningful in all cases - we actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/alpha/kernel/irq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index f6d2946edbd2..c1980eea75a6 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -35,7 +35,6 @@ DEFINE_PER_CPU(unsigned long, irq_pmi_count); void ack_bad_irq(unsigned int irq) { irq_err_count++; - printk(KERN_CRIT "Unexpected IRQ trap at vector %u\n", irq); } #ifdef CONFIG_SMP From patchwork Fri Dec 18 14:31:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9988C2BBD4 for ; Fri, 18 Dec 2020 14:36:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DA0423A62 for ; Fri, 18 Dec 2020 14:36:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728965AbgLROgZ (ORCPT ); Fri, 18 Dec 2020 09:36:25 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:38775 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727662AbgLROfQ (ORCPT ); Fri, 18 Dec 2020 09:35:16 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MD9Kj-1kzJDr1AGX-0099IA; Fri, 18 Dec 2020 15:31:58 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 09/23] arch: s390: drop misleading warning on spurious IRQ Date: Fri, 18 Dec 2020 15:31:08 +0100 Message-Id: <20201218143122.19459-10-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:+Fk5XG1M51DsDMqllxhuk9QMdwKM8nFiYzagO2Q/2cSgAuejovr dtmISK1c/qztd4178uEaymF5uh/0I6XlA2Tqnyx7Bfb0v6ONN47Yqppdl3VTdau8eLZW2Uv /pHid2mGQ+3dMXHd9bKt92Duo1y1rPLeQr5rGle5B4uBkwH7iz9s0bsnzCRdN3jFBUhSf/r +0OdIMQ80t8v/+o43h3+A== X-UI-Out-Filterresults: notjunk:1; V03:K0:Z2f4lndISjI=:zHUd/iqf0O3qag8NkEcoBz x4x9TA7Ovp04jopysG/BlFtt1L5oIEmvskqof0AHt9vQMAKkztiscW5ztKv8l1IPCHM4FRUK7 ob3aoPzcMvd0E5ijhnPp1qaioD3QFkMaBe+oev+iwsti2I965xNEIIOKQakRqrgwN7V2zYzBB 8XgP9bUY+3Tiv6CMn8DT42WJvWvHPiqPqpw8bGh8YBe9MMOekLpBZz6OTOzdFxDgJdyVlkxMc Woo6ULY0pjIcEj/2+3mzbmDNZrNjx4xo4WB6FTNIsI5UvulnLwvmYxAQR8juEJf6ShH7cGcxY kk6tE44rK5SWHHMaqfK5sZEBFToA3VUjtPeCZxjWMfyLWLVp6UOq4BJ74AXDFlPs57qLm8Xbb uH6PiWBNvirOZkAb5kUMzlHPjSXYR1xgbCzp2pBMri5zdtt3HN0eVFGqhHnrw Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The warning in ack_bad_irq() is misleading in several ways: * the term "vector" isn't quite correct * the printing format isn't consistent across the archs: some print decimal, some hex, some hex w/o 0x prefix. * the printed linux irq isn't meaningful in all cases - we actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/s390/include/asm/hardirq.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/s390/include/asm/hardirq.h b/arch/s390/include/asm/hardirq.h index dfbc3c6c0674..56d95fcb310a 100644 --- a/arch/s390/include/asm/hardirq.h +++ b/arch/s390/include/asm/hardirq.h @@ -21,9 +21,6 @@ #define __ARCH_HAS_DO_SOFTIRQ #define __ARCH_IRQ_EXIT_IRQS_DISABLED -static inline void ack_bad_irq(unsigned int irq) -{ - printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq); -} +#define ack_bad_irq(irq) #endif /* __ASM_HARDIRQ_H */ From patchwork Fri Dec 18 14:31:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345779 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D509C49EBE for ; Fri, 18 Dec 2020 14:36:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6722523AC0 for ; Fri, 18 Dec 2020 14:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728263AbgLROfX (ORCPT ); Fri, 18 Dec 2020 09:35:23 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:34529 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728110AbgLROfU (ORCPT ); Fri, 18 Dec 2020 09:35:20 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MplPh-1kIFED0xaP-00qCoo; Fri, 18 Dec 2020 15:32:00 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 10/23] arch: sh: drop misleading warning on spurious IRQ Date: Fri, 18 Dec 2020 15:31:09 +0100 Message-Id: <20201218143122.19459-11-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:6TL4KPw+Ks7RU+AOsNXR+Ltfqz8XJW1b6vQsJcdupkFn/HGWZEu Pxb0W8VDuSp/eowGr2QZ2YYTQOeQIZ9sqLBhLlV4U0gn+9wxn0ZUCYDi1tihD8RSGfUeK0C FGo4l2UrGrTty9YtCH6eYRewFkVOo2b5I9IK1HudQLPzVrlY+lg/sg4fjnmPhPdkFl0hPAj +B/DBmIm2JthV5pOD9Lkg== X-UI-Out-Filterresults: notjunk:1; V03:K0:UEl1mf8Ej6U=:vVuWyafI8JwPT8IqekTwUf kJjVjnagJeZHcYrcEXI6WwIlGSzMR+6bJyDiDgrQgM7iWZQNxupfE9+KZ4CH8xwAl9bz0An2S g9SX/sJHYF9btvrHzN98Mv01lN2WXq/JdCqiiTmep8ayCtPYeqZm1MWA+VpMPBqXCiySp4nKx YrriRyCaFlryZz82ICVCzrhapzFYKL90MwPaC/6LLngk9MDuAZXPEeA0CD9w5aVk5j4WXyXy5 moMvzvbBtoDNV/k1qA+tVeoczyKN9TMEwdpIVorDrHaUiPErxH0/+N3nGQGgxmN6gMk3qWGdm EQ926JDJncMRW18rLb97838aejHl2X+vn6odNyiZ81k15fjExFGn5Wsknjg4EIF4+ChUIckPq +B2MnXPkaLoMWdjQowJZMdiHVoEkc5t1KkUtVQLM/6nWRTJu4GUgNhKYVSNhR Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The warning in ack_bad_irq() is misleading in several ways: * the term "vector" isn't quite correct * the printing format isn't consistent across the archs: some print decimal, some hex, some hex w/o 0x prefix. * the printed linux irq isn't meaningful in all cases - we actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/sh/kernel/irq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index ab5f790b0cd2..c14a142efe60 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c @@ -31,7 +31,6 @@ atomic_t irq_err_count; void ack_bad_irq(unsigned int irq) { atomic_inc(&irq_err_count); - printk("unexpected IRQ trap at vector %02x\n", irq); } #if defined(CONFIG_PROC_FS) From patchwork Fri Dec 18 14:31:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345774 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BC9AC3526B for ; Fri, 18 Dec 2020 14:37:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A58123AC2 for ; Fri, 18 Dec 2020 14:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729090AbgLROgz (ORCPT ); Fri, 18 Dec 2020 09:36:55 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:50289 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727843AbgLROfL (ORCPT ); Fri, 18 Dec 2020 09:35:11 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MORN0-1kRYuy1Knu-00PuPN; Fri, 18 Dec 2020 15:32:02 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 11/23] arch: sparc: drop misleading warning on spurious IRQ Date: Fri, 18 Dec 2020 15:31:10 +0100 Message-Id: <20201218143122.19459-12-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:vpXcdJ5flfT9UMPnHgs6T5l9jtGqBDr3f0tC6p5Rjwsvidh10dx d0ToT43G0U3IwpJaBGtCswd9oef4Qd4eA0CAixsHtd5euXXJNxA9w1nGeD2/Gx6uxbiGLS0 tGewaqJssGqjA707NEZ8gDxxCE6ENgCktLf2r4JFNKn28o5k4rGK9s6JDW+QdfaOEf7J3lv xxUqavLjRvPdJSifMz8RA== X-UI-Out-Filterresults: notjunk:1; V03:K0:FAaCbJXPe/U=:euCZpYb16hzPdr0rOmUHvc Mbl+JbbJacqEK9NS1X93hWQ41jQUrJHb+lZ1iEOJt9HdnBQK73zA80gWDm5dUlkD4XzE25f4y iZAdXdl5Ah1QrxTSxe1Y9y9A+egjNscrkz9H9OjKHRyGuUxTp8qXnHzfp2syekussaP0P6Z2a gK3PCoS98+1XjVpv1rbiX7wTafMlpOeqHCPCX7GADLBTi797dxPRr9WMG/Fbu+uKKqXyJkHah jk51z873TwfbS+nMdLwkCU7zed0CiUFDHQ4QQUj0LFQxO1Hff0WZ447MWp3VaDYP+tDznjwrf Cf8Msp2xoXen16t6PctzlKTRT0MuKxO0wNlYwE+AwG2kgMTqJuSnpzJKj8Amk6YSEoRB0LaJO M2X2I0yt2w7VdDkA4pX0Tq421hrWkI6UhRpBP480D9vrnUkMmL2ONPeAnwhyx Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The warning in ack_bad_irq() is misleading in several ways: * the term "vector" isn't quite correct * the printing format isn't consistent across the archs: some print decimal, some hex, some hex w/o 0x prefix. * the printed linux irq isn't meaningful in all cases - we actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/sparc/include/asm/hardirq_64.h | 2 +- arch/sparc/kernel/irq_64.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/sparc/include/asm/hardirq_64.h b/arch/sparc/include/asm/hardirq_64.h index 75b92bfe04b5..874151f520de 100644 --- a/arch/sparc/include/asm/hardirq_64.h +++ b/arch/sparc/include/asm/hardirq_64.h @@ -14,6 +14,6 @@ #define local_softirq_pending_ref \ __cpu_data.__softirq_pending -void ack_bad_irq(unsigned int irq); +#define ack_bad_irq(irq) #endif /* !(__SPARC64_HARDIRQ_H) */ diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 3ec9f1402aad..ea2a52f7fe53 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c @@ -284,11 +284,6 @@ static unsigned int sysino_exists(u32 devhandle, unsigned int devino) return irq; } -void ack_bad_irq(unsigned int irq) -{ - pr_crit("BAD IRQ ack %d\n", irq); -} - void irq_install_pre_handler(int irq, void (*func)(unsigned int, void *, void *), void *arg1, void *arg2) From patchwork Fri Dec 18 14:31:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41EBEC47435 for ; Fri, 18 Dec 2020 14:35:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 215D023A84 for ; Fri, 18 Dec 2020 14:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728426AbgLROf2 (ORCPT ); Fri, 18 Dec 2020 09:35:28 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:57639 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728306AbgLROf0 (ORCPT ); Fri, 18 Dec 2020 09:35:26 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MBltM-1kviq71HjA-00CBAN; Fri, 18 Dec 2020 15:32:11 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 16/23] arch: alpha: use generic irq error counter Date: Fri, 18 Dec 2020 15:31:15 +0100 Message-Id: <20201218143122.19459-17-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:uL2eosxDfl+XvBZmyvuxi59hjqB3gvygQ2D3u1dkJBAEAzLMp1b 1MqzXADU9ncXWYXgkgCXzSTOO/Gt6me/VSxAj0zXBtHTCRIRMkS5pJ0Skq2jC6y+H4eUYXm JkrFDQIkB+d21rZBQBVVbAHeJNsVb0hqBYZu5CxiMjJsma4xxaiq0ffONnEzakJHMNwVw8C RLRxWTnjcmP98hgabxkLQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:+iUvMyPwCvY=:zxyQNJwX9WMyH3mOyj3hW9 2QA4nHu5IP5UnmuuasNI8nCnUEW/liy6+PRU6Nb+kbjLxPWUVv3AdHC8tAU/yJ4k5fZq2PP1Y wzJh6EGFl6pywLiRAqva6M/JYnOTmbDRuh9e+6/KxPoPQoaoAFrTYDyxrf8ebilKg2zPKbIO1 M6lJd+OzY35LdY/2PaNSD+KOEX58QaqHZ6K5ZEbmBrSuwka8S+aoM5mSipPxCLb9XUIVAb9mN URedXzwS9zxA2xjc/0wnxg8NEw5vGGbDLh2Fteam0ZLrfVv/1aAYaT3wx8AQ+WDZRiKk2NOhk jpF2+AtAH2CDiEa3SFnjAaCV1mcVeoyKxZaEEi1a+G0wCVUGA7ayTsHp2wbj3Z1ROQccsA4u8 12HLJxFiDKo/uUexSW2ySgO2rjAkJrGSXXNnYRkuvF5RTb79+B3IRzL0cbc0D Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/alpha/include/asm/hardirq.h | 3 --- arch/alpha/include/asm/hw_irq.h | 2 -- arch/alpha/kernel/irq.c | 12 +++--------- arch/alpha/kernel/irq_alpha.c | 5 +++-- arch/alpha/kernel/perf_event.c | 6 +++--- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/arch/alpha/include/asm/hardirq.h b/arch/alpha/include/asm/hardirq.h index 5ce5b34e8a1a..0bbc9947e364 100644 --- a/arch/alpha/include/asm/hardirq.h +++ b/arch/alpha/include/asm/hardirq.h @@ -2,9 +2,6 @@ #ifndef _ALPHA_HARDIRQ_H #define _ALPHA_HARDIRQ_H -void ack_bad_irq(unsigned int irq); -#define ack_bad_irq ack_bad_irq - #include #endif /* _ALPHA_HARDIRQ_H */ diff --git a/arch/alpha/include/asm/hw_irq.h b/arch/alpha/include/asm/hw_irq.h index e2d81ac0d934..0be79f3a6cae 100644 --- a/arch/alpha/include/asm/hw_irq.h +++ b/arch/alpha/include/asm/hw_irq.h @@ -2,8 +2,6 @@ #ifndef _ALPHA_HW_IRQ_H #define _ALPHA_HW_IRQ_H - -extern volatile unsigned long irq_err_count; DECLARE_PER_CPU(unsigned long, irq_pmi_count); #ifdef CONFIG_ALPHA_GENERIC diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index c1980eea75a6..2b7dad83e0dc 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -25,18 +25,12 @@ #include #include #include - +#include #include #include -volatile unsigned long irq_err_count; DEFINE_PER_CPU(unsigned long, irq_pmi_count); -void ack_bad_irq(unsigned int irq) -{ - irq_err_count++; -} - #ifdef CONFIG_SMP static char irq_user_affinity[NR_IRQS]; @@ -79,7 +73,7 @@ int arch_show_interrupts(struct seq_file *p, int prec) for_each_online_cpu(j) seq_printf(p, "%10lu ", per_cpu(irq_pmi_count, j)); seq_puts(p, " Performance Monitoring\n"); - seq_printf(p, "ERR: %10lu\n", irq_err_count); + seq_printf(p, "ERR: %10lu\n", irq_err_get()); return 0; } @@ -109,7 +103,7 @@ handle_irq(int irq) if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS)) { - irq_err_count++; + irq_err_inc(); illegal_count++; printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", irq); diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index d17e44c99df9..3b6373cf73d9 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "proto.h" #include "irq_impl.h" @@ -30,7 +31,7 @@ EXPORT_SYMBOL(__min_ipl); static void dummy_perf(unsigned long vector, struct pt_regs *regs) { - irq_err_count++; + irq_err_inc(); printk(KERN_CRIT "Performance counter interrupt!\n"); } @@ -60,7 +61,7 @@ do_entInt(unsigned long type, unsigned long vector, handle_ipi(regs); return; #else - irq_err_count++; + irq_err_inc(); printk(KERN_CRIT "Interprocessor interrupt? " "You must be kidding!\n"); #endif diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index e7a59d927d78..d855cece7bb1 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha/kernel/perf_event.c @@ -16,7 +16,7 @@ #include #include #include - +#include #include #include #include @@ -823,7 +823,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr, /* la_ptr is the counter that overflowed. */ if (unlikely(la_ptr >= alpha_pmu->num_pmcs)) { /* This should never occur! */ - irq_err_count++; + irq_err_inc(); pr_warn("PMI: silly index %ld\n", la_ptr); wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask); return; @@ -846,7 +846,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr, if (unlikely(!event)) { /* This should never occur! */ - irq_err_count++; + irq_err_inc(); pr_warn("PMI: No event at index %d!\n", idx); wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask); return; From patchwork Fri Dec 18 14:31:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17E41C3526E for ; Fri, 18 Dec 2020 14:36:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1B7123AC0 for ; Fri, 18 Dec 2020 14:36:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728795AbgLROgH (ORCPT ); Fri, 18 Dec 2020 09:36:07 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:47299 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728119AbgLROfV (ORCPT ); Fri, 18 Dec 2020 09:35:21 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MlwBf-1kQWgo0nzP-00j24e; Fri, 18 Dec 2020 15:32:13 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 17/23] arch: arm: use generic irq error counter Date: Fri, 18 Dec 2020 15:31:16 +0100 Message-Id: <20201218143122.19459-18-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:3SwIe0eO46CaJ5EoqMiX//gtX9bqQxyAhXLbP4/gz2GYyvjZ2Cb e7VCsHyTIhYbQmhKAxhT3mj64mNwoJPgzTdg41XdH3zeVx6oSMrNX8BMXGcIsxlzOPpwTdJ QPs7bYAr35zZd3PpIZiH7JApQsvFbkvqbv15imk3fseX8MAR9Bof6Yvzgi0vL2qnFJqjFSO +1Fl682AJzqT0h8vOWnFw== X-UI-Out-Filterresults: notjunk:1; V03:K0:FpYA9py1SLs=:7EMuIumlJwF6EAWdI1huM/ U2YTteDL2sd8MAXN30P7bcmsnzZ/B1612n3oZanzaRD9+Ue1XwbicYWhuC1Vwhx/7O21Vg3g7 RnRjxSv13kdOrBXFPyihNI2IcXTRS4nkLluii+JXoA1fqmEOreplj7Ih6+v9ZEIMo1yKTtYww DiAweeloTQJY5J60vfvpAICNi75XFV+Lb3EWUmma3GLSgeGTUvp/3IZu9dq4USm2v589eY5yV uihxlEA4WE09xu9wlzx7m88q9n9jBB4H71GwVepD+6UI7FSItEznfktktYfSAPbDwgdUBRv6d wZoDUZtfev/ySaoqBjOZOp+TK/4DsDFteHi7lvEjETiCatdmSDGWyK+SnWIQTyWB9UszPC5TU wn2E0e5nmisTNbFxPXhSX6bWOQ3lLHMPUCyvUFirWm5+0eO94Q5WyF0xF5aMR Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm/include/asm/hardirq.h | 2 +- arch/arm/include/asm/hw_irq.h | 6 ------ arch/arm/kernel/irq.c | 6 ++---- drivers/irqchip/irq-omap-intc.c | 5 ++--- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 706efafbf972..d9ae8998240d 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h @@ -5,7 +5,7 @@ #include #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 -#define ack_bad_irq ack_bad_irq +#define ack_bad_irq(irq) #include diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h index 5305c7e33aee..adbbeb11b930 100644 --- a/arch/arm/include/asm/hw_irq.h +++ b/arch/arm/include/asm/hw_irq.h @@ -5,12 +5,6 @@ #ifndef _ARCH_ARM_HW_IRQ_H #define _ARCH_ARM_HW_IRQ_H -static inline void ack_bad_irq(int irq) -{ - extern unsigned long irq_err_count; - irq_err_count++; -} - #define ARCH_IRQ_INIT_FLAGS (IRQ_NOREQUEST | IRQ_NOPROBE) #endif diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 698b6f636156..72c3b8ce74db 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -32,7 +32,7 @@ #include #include #include - +#include #include #include #include @@ -41,8 +41,6 @@ #include #include -unsigned long irq_err_count; - int arch_show_interrupts(struct seq_file *p, int prec) { #ifdef CONFIG_FIQ @@ -51,7 +49,7 @@ int arch_show_interrupts(struct seq_file *p, int prec) #ifdef CONFIG_SMP show_ipi_list(p, prec); #endif - seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); + seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_get()); return 0; } diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c index d360a6eddd6d..2682c6e814c2 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c @@ -15,7 +15,7 @@ #include #include #include - +#include #include #include #include @@ -328,7 +328,6 @@ static int __init omap_init_irq(u32 base, struct device_node *node) static asmlinkage void __exception_irq_entry omap_intc_handle_irq(struct pt_regs *regs) { - extern unsigned long irq_err_count; u32 irqnr; irqnr = intc_readl(INTC_SIR); @@ -351,7 +350,7 @@ omap_intc_handle_irq(struct pt_regs *regs) */ if (unlikely((irqnr & SPURIOUSIRQ_MASK) == SPURIOUSIRQ_MASK)) { pr_err_once("%s: spurious irq!\n", __func__); - irq_err_count++; + irq_err_inc(); omap_ack_irq(NULL); return; } From patchwork Fri Dec 18 14:31:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345778 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65094C2BBD5 for ; Fri, 18 Dec 2020 14:36:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DA5623AC0 for ; Fri, 18 Dec 2020 14:36:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728701AbgLROgA (ORCPT ); Fri, 18 Dec 2020 09:36:00 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:36429 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbgLROfV (ORCPT ); Fri, 18 Dec 2020 09:35:21 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MKsaz-1kVhVj3qdZ-00LDZe; Fri, 18 Dec 2020 15:32:15 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 18/23] arch: arm64: use generic irq error counter Date: Fri, 18 Dec 2020 15:31:17 +0100 Message-Id: <20201218143122.19459-19-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:ztAWgZI6xXIfs5hYABBMduPYxgBBPoOn3rTgKXCVjuQRy90ITLt Kg8k1YgqROrNsUA/RyLZJBzZVI3ZD2zezon+kPruX0g7F21+kdHyFQBv2S1Ck+zsXTj1H0m /BRMIKeXSwSpOj7tOcC2/xNNtF4ZZHCgr4LHlae/yPoEZlwrECyZ3alMstYrejssMsxs1Ny 6EQOPvdu2hC5uMp1enYzA== X-UI-Out-Filterresults: notjunk:1; V03:K0:Qd7gra9QKvU=:O3jAGv/c5nlZ9E1xiuVgIk I/ROuH1PlRfC/WrQnnVjkPgr48uJhGUs7PhqJrDCP4BZ7svz+H8cFCnoO2qKASLLVdZHp/JdD VdC0OmwMj2BnLqdOCiobtrS3RVOdzl940UD3oVWN487csDRsWTQ2UO39aAcVPD7XmQxJ1DVUi A6tB+zOj2ZCmwIFtkDpXNdVTUqi1lvAZA0DctLKqrlxVTNOVGSwOuLuLziGW4/Yil5+BivZFe ce/U2cXBCqEnBZxzfOHXp9ubtzOiBXFGtiVHr4CG9A/lFXvcerxsZEuApO8vUj6+Rg7f+FowC Ic7l7LAYUWOJ3Hm+9/0UsiOnt0iOPdXzrfQ0sEc8YmI5bbS+r9TYGLdfpzOw24Pm8evwda6DG ciSq2XP5sWHyCQt/mDsjjemlN2Uu6RiGXg1++FaAB32SN3jJZ93zYxKEySUBl Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm64/include/asm/hardirq.h | 9 ++------- arch/arm64/kernel/smp.c | 6 ++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/arm64/include/asm/hardirq.h b/arch/arm64/include/asm/hardirq.h index cbfa7b6f2e09..760922571084 100644 --- a/arch/arm64/include/asm/hardirq.h +++ b/arch/arm64/include/asm/hardirq.h @@ -13,7 +13,8 @@ #include #include -#define ack_bad_irq ack_bad_irq +#define ack_bad_irq(irq) + #include #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 @@ -85,10 +86,4 @@ do { \ write_sysreg(___hcr, hcr_el2); \ } while (0) -static inline void ack_bad_irq(unsigned int irq) -{ - extern unsigned long irq_err_count; - irq_err_count++; -} - #endif /* __ASM_HARDIRQ_H */ diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 2499b895efea..0edc565ea735 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -33,7 +33,7 @@ #include #include #include - +#include #include #include #include @@ -798,8 +798,6 @@ static const char *ipi_types[NR_IPI] __tracepoint_string = { static void smp_cross_call(const struct cpumask *target, unsigned int ipinr); -unsigned long irq_err_count; - int arch_show_interrupts(struct seq_file *p, int prec) { unsigned int cpu, i; @@ -813,7 +811,7 @@ int arch_show_interrupts(struct seq_file *p, int prec) seq_printf(p, " %s\n", ipi_types[i]); } - seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); + seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_get()); return 0; } From patchwork Fri Dec 18 14:31:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Enrico Weigelt, metux IT consult" X-Patchwork-Id: 345780 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 835F8C4743A for ; Fri, 18 Dec 2020 14:36:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5674E23AAA for ; Fri, 18 Dec 2020 14:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728579AbgLROfn (ORCPT ); Fri, 18 Dec 2020 09:35:43 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:48969 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728196AbgLROfX (ORCPT ); Fri, 18 Dec 2020 09:35:23 -0500 Received: from orion.localdomain ([95.115.54.243]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MO9qz-1kSO7t2hRp-00OXUo; Fri, 18 Dec 2020 15:32:16 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, catalin.marinas@arm.com, will@kernel.org, msalter@redhat.com, jacquiot.aurelien@gmail.com, gerg@linux-m68k.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, maz@kernel.org, tony@atomide.com, arnd@arndb.de, linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 19/23] arch: c6x: use generic irq error counter Date: Fri, 18 Dec 2020 15:31:18 +0100 Message-Id: <20201218143122.19459-20-info@metux.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201218143122.19459-1-info@metux.net> References: <20201218143122.19459-1-info@metux.net> X-Provags-ID: V03:K1:bUKbPuD/IE863dGqQP/aUVD3gMjanOmJq5smfk4HYWrMLwZeTSB k45+tw0yA/1Jgzwos83k90orLCs83aroaMpeBB39uP1uMMStvQ9QhtXMH4BYz0IipHOkY0v kH2GQ3WJCiarTYQXG5Q2sadZG2E46xZvuqbjZ+YUOPphysIBTTbyIiz3i3rbydpQdeWrHaA LVhGNnbvccZshL+Bhd3sQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:vf+aytBGJWs=:r2eZwHED7IQmg6gl03ucQ8 l/17rxJDH3Q0EehshvVMk0IPYVvjvVR1C65/GN46yrjD3HCMOP/rrIcikwR5HIgVGjphssKtc o1lv+fPa0+Hc94H5Hrr/VIr7xmqV3jwm/vnqCzDlsUPvneuBzmfR3qpEB8UAYM1h9ScjXoC2l MKQTwfAiMlD7plZW+Ee/8vfC1criUczadakTuunPoNaWsDY1eyC+81GByepRkc1iQUKybJcMl ZfT5eVrVcfhx4kg56Z6SbUPfyHAapCnNNYUJo0WSq16JFSLA6qZunWCcuhqFj0NJmHWstMF+B 1mDqxGu7XYmAbhrPklXsi0ZwpczbVtKfKbBJMPT4YOecjG+Y3G6ewvh1UD6PrIxn5E5d54uln v2eQWiQMuctBB13Iev8txxMZUc5iK4R0+3okQnQhFKSsiqpo7859MSe15Do6+ Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/c6x/include/asm/hardirq.h | 3 --- arch/c6x/include/asm/irq.h | 2 -- arch/c6x/kernel/irq.c | 11 ++--------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/c6x/include/asm/hardirq.h b/arch/c6x/include/asm/hardirq.h index f37d07d31040..f70f6113e53a 100644 --- a/arch/c6x/include/asm/hardirq.h +++ b/arch/c6x/include/asm/hardirq.h @@ -9,9 +9,6 @@ #ifndef _ASM_C6X_HARDIRQ_H #define _ASM_C6X_HARDIRQ_H -extern void ack_bad_irq(int irq); -#define ack_bad_irq ack_bad_irq - #include #endif /* _ASM_C6X_HARDIRQ_H */ diff --git a/arch/c6x/include/asm/irq.h b/arch/c6x/include/asm/irq.h index 9da4d1afd0d7..f42c5747c3ee 100644 --- a/arch/c6x/include/asm/irq.h +++ b/arch/c6x/include/asm/irq.h @@ -45,6 +45,4 @@ struct pt_regs; extern asmlinkage void c6x_do_IRQ(unsigned int prio, struct pt_regs *regs); -extern unsigned long irq_err_count; - #endif /* _ASM_C6X_IRQ_H */ diff --git a/arch/c6x/kernel/irq.c b/arch/c6x/kernel/irq.c index b9f7cfa2ed21..9f9d798925de 100644 --- a/arch/c6x/kernel/irq.c +++ b/arch/c6x/kernel/irq.c @@ -21,12 +21,10 @@ #include #include #include - +#include #include #include -unsigned long irq_err_count; - static DEFINE_RAW_SPINLOCK(core_irq_lock); static void mask_core_irq(struct irq_data *data) @@ -114,13 +112,8 @@ void __init init_IRQ(void) set_creg(ICR, 0xfff0); } -void ack_bad_irq(int irq) -{ - irq_err_count++; -} - int arch_show_interrupts(struct seq_file *p, int prec) { - seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); + seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_get()); return 0; }