Skip to content

Commit

Permalink
target/riscv/csr.c: use env_archcpu() in ctr()
Browse files Browse the repository at this point in the history
We don't need to use env_cpu() and CPUState().

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20230224174520.92490-2-dbarboza@ventanamicro.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
  • Loading branch information
danielhb authored and palmer-dabbelt committed Mar 2, 2023
1 parent d4ea711 commit 3c7d54f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions target/riscv/csr.c
Expand Up @@ -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;
Expand Down

0 comments on commit 3c7d54f

Please sign in to comment.