Skip to content

Commit 8811eee

Browse files
pussuwxiaoxiang781216
authored andcommitted
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.
1 parent 8fe3ab3 commit 8811eee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/risc-v/src/common/riscv_cpustart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void riscv_cpu_boot(int cpu)
8181
{
8282
asm("WFI");
8383
}
84-
while (READ_CSR(CSR_IP) != IP_SIP);
84+
while (!(READ_CSR(CSR_IP) & IP_SIP));
8585

8686
#ifdef CONFIG_RISCV_PERCPU_SCRATCH
8787
/* Initialize the per CPU areas */

0 commit comments

Comments
 (0)