From: Daniel Henrique Barboza <dbarb...@ventanamicro.com> We don't need to use env_cpu() and CPUState().
Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-ID: <20230224174520.92490-2-dbarb...@ventanamicro.com> Signed-off-by: Palmer Dabbelt <pal...@rivosinc.com> --- target/riscv/csr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 1b0a0c1693..d047d8b45c 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -108,8 +108,7 @@ static RISCVException vs(CPURISCVState *env, int csrno) static RISCVException ctr(CPURISCVState *env, int csrno) { #if !defined(CONFIG_USER_ONLY) - CPUState *cs = env_cpu(env); - RISCVCPU *cpu = RISCV_CPU(cs); + RISCVCPU *cpu = env_archcpu(env); int ctr_index; target_ulong ctr_mask; int base_csrno = CSR_CYCLE; -- 2.39.2