Skip to content

Commit

Permalink
riscv_cpustart.c: Fix reading of interrupt status
Browse files Browse the repository at this point in the history
Let's read the interrupt status correctly, by checking for the interrupt
source bit instead of assuming no other status bit is set.
  • Loading branch information
pussuw committed Oct 17, 2024
1 parent 14eec2c commit 18c9ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/riscv_cpustart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 18c9ce0

Please sign in to comment.