riscv/cpustart: Ensure we receive Soft IRQ / IPI before booting CPU

Some spurious interrupt might wake WFI, ensure we got woken by IPI before
continuing CPU boot.
This commit is contained in:
Ville Juven
2024-10-11 13:22:23 +03:00
committed by Xiang Xiao
parent eb27ebba8a
commit 526ba1ab34
+5 -1
View File
@@ -77,7 +77,11 @@ void riscv_cpu_boot(int cpu)
/* Wait interrupt */
asm("WFI");
do
{
asm("WFI");
}
while (READ_CSR(CSR_IP) != IP_SIP);
#ifdef CONFIG_RISCV_PERCPU_SCRATCH
/* Initialize the per CPU areas */