From f0151889f0f5a51e2555980d74e7a86d0b9aa849 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Thu, 25 Jun 2020 17:33:56 -0700 Subject: 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 --- src/target/riscv/riscv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 65b60cd..8e7d5c7 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -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; -- cgit v1.1