arch/risc-v: does not clear IPI address in S mode

According to the riscv-aclint doc, writing 0 to SSWI address
has no effect. Remove this unnecessary write for S mode.

Link: https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
This commit is contained in:
Inochi Amaoto 2024-07-16 16:38:41 +08:00 committed by Xiang Xiao
parent 985d395b02
commit 0ddcbe62ec
1 changed files with 1 additions and 1 deletions

View File

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