On Tue, 2026-11-10 at 18:23 -0300, Daniel Henrique Barboza wrote:
> There is no other use for the RISCVCPU* pointer aside from accessing
> cpu->cfg.  Use the riscv_cpu_cfg(env) inline to retrieve
> cfg.cbom_blocksize instead.
> 
> Signed-off-by: Daniel Henrique Barboza
> <[email protected]>

Reviewed-by: Alistair Francis <[email protected]>

Alistair

> ---
>  target/riscv/tcg/op_helper.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/target/riscv/tcg/op_helper.c
> b/target/riscv/tcg/op_helper.c
> index f9c79fe6b9..d7af56ef61 100644
> --- a/target/riscv/tcg/op_helper.c
> +++ b/target/riscv/tcg/op_helper.c
> @@ -229,9 +229,8 @@ static void check_zicbom_access(CPURISCVState
> *env,
>                                  target_ulong address,
>                                  uintptr_t ra)
>  {
> -    RISCVCPU *cpu = env_archcpu(env);
> +    uint16_t cbomlen = riscv_cpu_cfg(env)->cbom_blocksize;
>      int mmu_idx = riscv_env_mmu_index(env, false);
> -    uint16_t cbomlen = cpu->cfg.cbom_blocksize;
>      void *phost;
>      int ret;
>  

Reply via email to