* [PATCH] ARM: remove the last few uses of do_bad_IRQ()
@ 2026-05-18 2:40 Ethan Nelson-Moore
2026-05-25 8:20 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Ethan Nelson-Moore @ 2026-05-18 2:40 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: Ethan Nelson-Moore, Russell King, Linus Walleij, Thomas Gleixner,
Bartosz Golaszewski, Greg Kroah-Hartman, Kees Cook,
Arnd Bergmann, Adrian Barnaś
The do_bad_IRQ() macro simply calls handle_bad_irq() with a lock around
it. It also carries a comment stating that uses of it should be
replaced. According to commit aec0095653cd ("irqchip: gic: Call
handle_bad_irq() directly"), which replaced another use of
do_bad_IRQ(), locking the IRQ descriptor is not necessary for error
reporting. Therefore, replace all uses of do_bad_IRQ() with calls to
handle_bad_irq() and remove do_bad_IRQ().
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
arch/arm/common/sa1111.c | 2 +-
arch/arm/include/asm/mach/irq.h | 10 ----------
| 2 +-
drivers/irqchip/irq-versatile-fpga.c | 2 +-
4 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 449c8bb86453..a0f854cf4748 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -221,7 +221,7 @@ static void sa1111_irq_handler(struct irq_desc *desc)
writel_relaxed(stat1, mapbase + SA1111_INTSTATCLR1);
if (stat0 == 0 && stat1 == 0) {
- do_bad_IRQ(desc);
+ handle_bad_irq(desc);
return;
}
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index dfe832a3bfc7..fdcd8388977d 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -17,14 +17,4 @@ struct seq_file;
extern void init_FIQ(int);
extern int show_fiq_list(struct seq_file *, int);
-/*
- * This is for easy migration, but should be changed in the source
- */
-#define do_bad_IRQ(desc) \
-do { \
- raw_spin_lock(&desc->lock); \
- handle_bad_irq(desc); \
- raw_spin_unlock(&desc->lock); \
-} while(0)
-
#endif
--git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
index 842ddb4121ef..48c7b3efd555 100644
--- a/arch/arm/mach-footbridge/isa-irq.c
+++ b/arch/arm/mach-footbridge/isa-irq.c
@@ -89,7 +89,7 @@ static void isa_irq_handler(struct irq_desc *desc)
unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE;
if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) {
- do_bad_IRQ(desc);
+ handle_bad_irq(desc);
return;
}
diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 034ce6afe170..6eaad836d9ff 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -89,7 +89,7 @@ static void fpga_irq_handle(struct irq_desc *desc)
status = readl(f->base + IRQ_STATUS);
if (status == 0) {
- do_bad_IRQ(desc);
+ handle_bad_irq(desc);
goto out;
}
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ARM: remove the last few uses of do_bad_IRQ()
2026-05-18 2:40 [PATCH] ARM: remove the last few uses of do_bad_IRQ() Ethan Nelson-Moore
@ 2026-05-25 8:20 ` Linus Walleij
2026-06-10 4:58 ` Ethan Nelson-Moore
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2026-05-25 8:20 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: linux-arm-kernel, linux-kernel, Russell King, Thomas Gleixner,
Bartosz Golaszewski, Greg Kroah-Hartman, Kees Cook,
Arnd Bergmann, Adrian Barnaś
On Mon, May 18, 2026 at 4:41 AM Ethan Nelson-Moore
<enelsonmoore@gmail.com> wrote:
> The do_bad_IRQ() macro simply calls handle_bad_irq() with a lock around
> it. It also carries a comment stating that uses of it should be
> replaced. According to commit aec0095653cd ("irqchip: gic: Call
> handle_bad_irq() directly"), which replaced another use of
> do_bad_IRQ(), locking the IRQ descriptor is not necessary for error
> reporting. Therefore, replace all uses of do_bad_IRQ() with calls to
> handle_bad_irq() and remove do_bad_IRQ().
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Please send this patch to the SoC tree (soc@kernel.org) after review
so the SoC maintainers can apply it.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ARM: remove the last few uses of do_bad_IRQ()
2026-05-25 8:20 ` Linus Walleij
@ 2026-06-10 4:58 ` Ethan Nelson-Moore
0 siblings, 0 replies; 3+ messages in thread
From: Ethan Nelson-Moore @ 2026-06-10 4:58 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-kernel, linux-kernel, Russell King, Thomas Gleixner,
Bartosz Golaszewski, Greg Kroah-Hartman, Kees Cook,
Arnd Bergmann, Adrian Barnaś
Hi, Linus,
On Mon, May 25, 2026 at 1:20 AM Linus Walleij <linusw@kernel.org> wrote:
> Please send this patch to the SoC tree (soc@kernel.org) after review
> so the SoC maintainers can apply it.
Done. Thanks for letting me know that I should do this.
Ethan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-10 4:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-18 2:40 [PATCH] ARM: remove the last few uses of do_bad_IRQ() Ethan Nelson-Moore
2026-05-25 8:20 ` Linus Walleij
2026-06-10 4:58 ` Ethan Nelson-Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®