Don't halt the algorith-running hart because another is halted. (#490)

This logic is a little tortured, but it still passes the semihosting
tests that were the cause for the recent rewrite.

Change-Id: Ic6760bb068621ab2a49feb0cf3998fc6957b5cfc
This commit is contained in:
Tim Newsome 2020-06-25 17:33:56 -07:00 committed by GitHub
parent 0b1b9e2034
commit f0151889f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -2080,7 +2080,7 @@ int riscv_openocd_poll(struct target *target)
} else if (target->smp) {
unsigned halts_discovered = 0;
unsigned total_targets = 0;
bool newly_halted[128] = {0};
bool newly_halted[RISCV_MAX_HARTS] = {0};
unsigned should_remain_halted = 0;
unsigned should_resume = 0;
unsigned i = 0;
@ -2093,8 +2093,6 @@ int riscv_openocd_poll(struct target *target)
enum riscv_poll_hart out = riscv_poll_hart(t, r->current_hartid);
switch (out) {
case RPH_NO_CHANGE:
if (t->state == TARGET_HALTED)
should_remain_halted++;
break;
case RPH_DISCOVERED_RUNNING:
t->state = TARGET_RUNNING;