diff --git a/arch/risc-v/src/mpfs/mpfs_irq.c b/arch/risc-v/src/mpfs/mpfs_irq.c index ce9ff8f9194..cff60f6d90d 100755 --- a/arch/risc-v/src/mpfs/mpfs_irq.c +++ b/arch/risc-v/src/mpfs/mpfs_irq.c @@ -98,15 +98,9 @@ void up_irqinitialize(void) CURRENT_REGS = NULL; - /* Attach the ecall interrupt handler */ + /* Attach the common interrupt handler */ -#ifndef CONFIG_ARCH_USE_S_MODE - irq_attach(RISCV_IRQ_ECALLM, riscv_swint, NULL); -#endif - -#ifndef CONFIG_BUILD_FLAT - irq_attach(RISCV_IRQ_ECALLU, riscv_swint, NULL); -#endif + riscv_exception_attach(); #ifndef CONFIG_SUPPRESS_INTERRUPTS