[PATCH 1/3] MIPS: Make do_IRQ() available for assembly callers

From: Maciej W. Rozycki

Date: Mon May 04 2026 - 16:15:00 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 again, however its `asmlinkage' annotation has never
been brought back from the previous removal of the function with commit
187933f23679 ("[MIPS] do_IRQ cleanup").

Since calling the function directly from assembly code has a performance
advantage, add the annotation back so that the DEC platform can make use
of this again.

Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
---
arch/mips/include/asm/irq.h | 2 +-
arch/mips/kernel/irq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

linux-mips-do-irq-asmlinkage.diff
Index: linux-macro/arch/mips/include/asm/irq.h
===================================================================
--- linux-macro.orig/arch/mips/include/asm/irq.h
+++ linux-macro/arch/mips/include/asm/irq.h
@@ -54,7 +54,7 @@ static inline int irq_canonicalize(int i

asmlinkage void plat_irq_dispatch(void);

-extern void do_IRQ(unsigned int irq);
+asmlinkage void do_IRQ(unsigned int irq);

struct irq_domain;
extern void do_domain_IRQ(struct irq_domain *domain, unsigned int irq);
Index: linux-macro/arch/mips/kernel/irq.c
===================================================================
--- linux-macro.orig/arch/mips/kernel/irq.c
+++ linux-macro/arch/mips/kernel/irq.c
@@ -100,7 +100,7 @@ static inline void check_stack_overflow(
* SMP cross-CPU interrupts have their own specific
* handlers).
*/
-void __irq_entry do_IRQ(unsigned int irq)
+asmlinkage void __irq_entry do_IRQ(unsigned int irq)
{
irq_enter();
check_stack_overflow();