target/riscv: Fix small riscv013_halt_go() bug
Exit the loop when no harts are running, instead of when at least one hart has halted. Change-Id: Ia69b626bf1fee4034bd5ccc800a651bfe0e53685 Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
parent
69222be761
commit
2d7dc3f5f5
|
@ -4281,7 +4281,7 @@ static int riscv013_halt_go(struct target *target)
|
||||||
if (dmstatus_read(target, &dmstatus, true) != ERROR_OK)
|
if (dmstatus_read(target, &dmstatus, true) != ERROR_OK)
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
/* When no harts are running, there's no point in continuing this loop. */
|
/* When no harts are running, there's no point in continuing this loop. */
|
||||||
if (!get_field(dmstatus, DM_DMSTATUS_ALLRUNNING))
|
if (!get_field(dmstatus, DM_DMSTATUS_ANYRUNNING))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue