[PATCH 2/3] MIPS: DEC: Remove do_IRQ() call indirection

From: Maciej W. Rozycki

Date: Mon May 04 2026 - 16:14:10 EST


As from commit 8f99a1626535 ("MIPS: Tracing: Add IRQENTRY_EXIT section
for MIPS") do_IRQ() is not a macro anymore and can be invoked directly
from assembly code, as a tail call. Remove the dec_irq_dispatch() stub
then and the indirection previously introduced with commit 187933f23679
("[MIPS] do_IRQ cleanup"), improving performance by reducing the number
of control flow changes and the overall instruction count, while fixing
a compiler's complaint about a missing prototype for said stub:

arch/mips/dec/setup.c:780:25: warning: no previous prototype for 'dec_irq_dispatch' [-Wmissing-prototypes]
780 | asmlinkage unsigned int dec_irq_dispatch(unsigned int irq)
| ^~~~~~~~~~~~~~~~

(which gets promoted to a compilation error with CONFIG_WERROR).

Fixes: 8f99a1626535 ("MIPS: Tracing: Add IRQENTRY_EXIT section for MIPS")
Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
---
arch/mips/dec/int-handler.S | 2 +-
arch/mips/dec/setup.c | 6 ------
2 files changed, 1 insertion(+), 7 deletions(-)

linux-mips-dec-do-irq.diff
Index: linux-macro/arch/mips/dec/int-handler.S
===================================================================
--- linux-macro.orig/arch/mips/dec/int-handler.S
+++ linux-macro/arch/mips/dec/int-handler.S
@@ -277,7 +277,7 @@
srlv t3,t1,t2

handle_it:
- j dec_irq_dispatch
+ j do_IRQ
nop

#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
Index: linux-macro/arch/mips/dec/setup.c
===================================================================
--- linux-macro.orig/arch/mips/dec/setup.c
+++ linux-macro/arch/mips/dec/setup.c
@@ -776,9 +776,3 @@ void __init arch_init_irq(void)
pr_err("Failed to register halt interrupt\n");
}
}
-
-asmlinkage unsigned int dec_irq_dispatch(unsigned int irq)
-{
- do_IRQ(irq);
- return 0;
-}