RISC-V: Clear SIP bit only when using SBI IPI operations
authorAnup Patel <apatel@ventanamicro.com>
Tue, 28 Mar 2023 03:52:17 +0000 (09:22 +0530)
committerMarc Zyngier <maz@kernel.org>
Sat, 8 Apr 2023 10:26:23 +0000 (11:26 +0100)
commit3ee92565b83ecc08e5b0c878dd87a2973eaca2ea
treee1ed67069e6835bec9825cc9e5d9425770e71f07
parent197b6b60ae7bc51dd0814953c562833143b292aa
RISC-V: Clear SIP bit only when using SBI IPI operations

The software interrupt pending (i.e. [M|S]SIP) bit is writeable for
S-mode but read-only for M-mode so we clear this bit only when using
SBI IPI operations.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230328035223.1480939-2-apatel@ventanamicro.com
arch/riscv/kernel/sbi.c
arch/riscv/kernel/smp.c