diff --git a/arch/risc-v/src/common/riscv_ipi.h b/arch/risc-v/src/common/riscv_ipi.h index 1b2b649f3b..8c3989d7ee 100644 --- a/arch/risc-v/src/common/riscv_ipi.h +++ b/arch/risc-v/src/common/riscv_ipi.h @@ -45,7 +45,7 @@ static inline void riscv_ipi_send(int cpu) static inline void riscv_ipi_clear(int cpu) { -#if defined(RISCV_IPI) +#if defined(RISCV_IPI) && !defined(CONFIG_ARCH_USE_S_MODE) putreg32(0, (uintptr_t)RISCV_IPI + (4 * cpu)); #endif CLEAR_CSR(CSR_IP, IP_SIP);