From a5725fe1aee90b82c0797d66e1816b2d664fb76f Mon Sep 17 00:00:00 2001 From: cgsfv Date: Fri, 14 Jun 2019 11:30:05 +0200 Subject: [PATCH] Reversed hart loop order in riscv_resume_go_all_harts --- src/target/riscv/riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 1f4883c92..af7f4efca 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -2344,7 +2344,7 @@ void riscv_info_init(struct target *target, riscv_info_t *r) static int riscv_resume_go_all_harts(struct target *target) { RISCV_INFO(r); - for (int i = 0; i < riscv_count_harts(target); ++i) { + for (int i = riscv_count_harts(target)-1; i >= 0; --i) { if (!riscv_hart_enabled(target, i)) continue;