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 <gerwin.klein@proofcraft.systems>
This commit is contained in:
Gerwin Klein 2025-11-19 16:47:33 +11:00
parent fdf7f2a082
commit 3dbd033338

View file

@ -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());
}