From 3dbd03333823807ecdbe07e0ec98250686262006 Mon Sep 17 00:00:00 2001 From: Gerwin Klein Date: Wed, 19 Nov 2025 16:47:33 +1100 Subject: [PATCH] riscv: remove debug printing inside spuriousIRQ Remove debug printing inside handleSpuriousIRQ() to get the same behaviour as on the other architectures. Spurious IRQ reporting already happens on the outside of this function. The IRQ that is printed has to be irqInvalid (= 0 on RISC-V), because that is when this function is called. RISC-V introduces an additional case when irq > maxIRQ, which should not be possible (could theoretically happen during a board port when maxIRQ is set incorrectly). The reason this IRQ printing is coming up now is that MCS (incorrectly) calls preemption point handling when no IRQ has fired, but thread budget has expired. This registers as spurious IRQ in preemption handling, since no IRQ happened and getActiveIRQ correctly returns irqInvalid. Generic spurious IRQ printing was disabled for this case on the outside of this function (until the MCS behaviour is adjusted), but the special RISC-V printing was not covered by that measure so far. Signed-off-by: Gerwin Klein --- src/arch/riscv/machine/hardware.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/arch/riscv/machine/hardware.c b/src/arch/riscv/machine/hardware.c index faad56071..e3aadd9f6 100644 --- a/src/arch/riscv/machine/hardware.c +++ b/src/arch/riscv/machine/hardware.c @@ -273,5 +273,4 @@ BOOT_CODE void initIRQController(void) static inline void handleSpuriousIRQ(void) { /* Do nothing */ - printf("Spurious IRQ!! SIP 0x%"SEL4_PRIx_word", SIE 0x%"SEL4_PRIx_word"\n", read_sip(), read_sie()); }