[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201218143122.19459-2-info@metux.net>
Date: Fri, 18 Dec 2020 15:31:00 +0100
From: "Enrico Weigelt, metux IT consult" <info@...ux.net>
To: linux-kernel@...r.kernel.org
Cc: mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...hat.com, namhyung@...nel.org, catalin.marinas@....com,
will@...nel.org, msalter@...hat.com, jacquiot.aurelien@...il.com,
gerg@...ux-m68k.org, geert@...ux-m68k.org,
tsbogend@...ha.franken.de, James.Bottomley@...senPartnership.com,
deller@....de, benh@...nel.crashing.org, paulus@...ba.org,
ysato@...rs.sourceforge.jp, dalias@...c.org, davem@...emloft.net,
tglx@...utronix.de, bp@...en8.de, x86@...nel.org, hpa@...or.com,
linus.walleij@...aro.org, bgolaszewski@...libre.com,
maz@...nel.org, tony@...mide.com, arnd@...db.de,
linux-alpha@...r.kernel.org, linux-c6x-dev@...ux-c6x.org,
linux-ia64@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-mips@...r.kernel.org, linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-omap@...r.kernel.org,
linux-arch@...r.kernel.org
Subject: [PATCH 01/23] kernel: irq: irqdescs: warn on spurious IRQ
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 <info@...ux.net>
---
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 {
--
2.11.0
Powered by blists - more mailing lists