target/riscv: drop unused variable registers_initialized 95/6995/2
authorTomas Vanek <vanekt@fbl.cz>
Thu, 26 May 2022 07:26:14 +0000 (09:26 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 4 Jun 2022 08:20:09 +0000 (08:20 +0000)
Change-Id: If7bfe38ac273ce9e54003e003807e128cced1568
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6995
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/riscv/riscv.c
src/target/riscv/riscv.h

index a266f5da3a5a95406f2c38b656c29e4f8b7ea569..e2d8e7098e567b1de8d0904371a604c5048a8726 100644 (file)
@@ -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;
 
@@ -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)
index 0ae8945daa9e1a1abf8ad36dac253616dfee4a01..6eb9158474cf2d62d5ce3522dcef786bedc09d52 100644 (file)
@@ -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;
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)