diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2017-05-01 08:31:18 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-05-01 08:32:43 -0700 |
commit | ba3a56937bc921a72b672d666a60ea4292cff449 (patch) | |
tree | 544245019b3e9869505c6fe0aac7b057815c9a33 /src | |
parent | 1ec607c726f338bc59c022a8c7887223a1d310d4 (diff) | |
download | riscv-openocd-ba3a56937bc921a72b672d666a60ea4292cff449.zip riscv-openocd-ba3a56937bc921a72b672d666a60ea4292cff449.tar.gz riscv-openocd-ba3a56937bc921a72b672d666a60ea4292cff449.tar.bz2 |
Correct previous hart caching logic
Diffstat (limited to 'src')
-rw-r--r-- | src/target/riscv/riscv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 15dfccb..42c2f87 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -890,9 +890,10 @@ bool riscv_rtos_enabled(const struct target *target) void riscv_set_current_hartid(struct target *target, int hartid) { RISCV_INFO(r); + int previous_hartid = riscv_current_hartid(target); r->current_hartid = hartid; assert(riscv_rtos_enabled(target) || target->coreid == hartid); - int previous_hartid = riscv_current_hartid(target); + LOG_DEBUG("setting hartid to %d, was %d", hartid, previous_hartid); if (riscv_rtos_enabled(target)) r->select_current_hart(target); |