riscv_cpustart.c: Fix reading of interrupt status

Let's read the interrupt status correctly, by checking for the interrupt
source bit instead of assuming no other status bit is set.
This commit is contained in:
Ville Juven 2024-10-17 10:09:30 +03:00 committed by Xiang Xiao
parent 8fe3ab3e39
commit 8811eee0f4

View file

@ -81,7 +81,7 @@ void riscv_cpu_boot(int cpu)
{
asm("WFI");
}
while (READ_CSR(CSR_IP) != IP_SIP);
while (!(READ_CSR(CSR_IP) & IP_SIP));
#ifdef CONFIG_RISCV_PERCPU_SCRATCH
/* Initialize the per CPU areas */