riscv: properly clear pending IPI flags

Commit 4f9b547ebd ("riscv: smp: prepare for more than one IPI type")
didn't clear pending IPI flags.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
Nicolas Pitre 2023-01-25 14:31:23 -05:00 committed by Christopher Friedt
commit 6b9526c09b

View file

@ -92,7 +92,7 @@ static void ipi_handler(const void *unused)
MSIP(csr_read(mhartid)) = 0;
atomic_val_t pending_ipi = atomic_get(&cpu_pending_ipi[_current_cpu->id]);
atomic_val_t pending_ipi = atomic_clear(&cpu_pending_ipi[_current_cpu->id]);
if (pending_ipi & IPI_SCHED) {
z_sched_ipi();