Skip to content

Commit

Permalink
target/riscv: drop unused variable registers_initialized
Browse files Browse the repository at this point in the history
Change-Id: If7bfe38ac273ce9e54003e003807e128cced1568
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/6995
Tested-by: jenkins
Reviewed-by: Tim Newsome <[email protected]>
Reviewed-by: Antonio Borneo <[email protected]>
  • Loading branch information
tom-van authored and borneoa committed Jun 4, 2022
1 parent 78c87f5 commit 7e9e5dc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/target/riscv/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3202,7 +3202,6 @@ void riscv_info_init(struct target *target, riscv_info_t *r)
{
memset(r, 0, sizeof(*r));
r->dtm_version = 1;
r->registers_initialized = false;
r->current_hartid = target->coreid;
r->version_specific = NULL;

Expand Down Expand Up @@ -3301,16 +3300,12 @@ int riscv_set_current_hartid(struct target *target, int hartid)

void riscv_invalidate_register_cache(struct target *target)
{
RISCV_INFO(r);

LOG_DEBUG("[%d]", target->coreid);
register_cache_invalidate(target->reg_cache);
for (size_t i = 0; i < target->reg_cache->num_regs; ++i) {
struct reg *reg = &target->reg_cache->reg_list[i];
reg->valid = false;
}

r->registers_initialized = true;
}

int riscv_current_hartid(const struct target *target)
Expand Down
3 changes: 0 additions & 3 deletions src/target/riscv/riscv.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ typedef struct {
/* The number of entries in the debug buffer. */
int debug_buffer_size;

/* This avoids invalidating the register cache too often. */
bool registers_initialized;

/* This hart contains an implicit ebreak at the end of the program buffer. */
bool impebreak;

Expand Down

0 comments on commit 7e9e5dc

Please sign in to comment.