target/riscv: Simplify type conversion for CPURISCVState
authorWeiwei Li <liweiwei@iscas.ac.cn>
Thu, 9 Mar 2023 07:13:28 +0000 (15:13 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 5 May 2023 00:49:49 +0000 (10:49 +1000)
commitbbb9fc2591cdecfa40ba7791101e91c83441ed49
tree9ec8895c31990ac5855e527df7f81a0b523e8e05
parent99c2f5c42ad7d5084c28d16890425ca2d339e9ef
target/riscv: Simplify type conversion for CPURISCVState

Use CPURISCVState as argument directly in riscv_cpu_update_mip and
riscv_timer_write_timecmp, since type converts from CPURISCVState to
RISCVCPU in many caller of them and then back to CPURISCVState in them.

Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-Id: <20230309071329.45932-4-liweiwei@iscas.ac.cn>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.c
target/riscv/cpu.h
target/riscv/cpu_helper.c
target/riscv/csr.c
target/riscv/pmu.c
target/riscv/time_helper.c
target/riscv/time_helper.h