qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 15/26] target/arm: Introduce arm_mmu_idx


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 15/26] target/arm: Introduce arm_mmu_idx
Date: Tue, 11 Dec 2018 15:43:17 +0000

On Fri, 7 Dec 2018 at 10:36, Richard Henderson
<address@hidden> wrote:
>
> The pattern
>
>   ARMMMUIdx mmu_idx = core_to_arm_mmu_idx(env, cpu_mmu_index(env, false));
>
> is computing the full ARMMMUIdx, stripping off the ARM bits,
> and then putting them back.
>
> Avoid the extra two steps with the appropriate helper function.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>  target/arm/cpu.h    |  1 +
>  target/arm/helper.c | 27 ++++++++++++++++-----------
>  2 files changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/target/arm/cpu.h b/target/arm/cpu.h
> index 18f2378b87..6bac5c18d0 100644
> --- a/target/arm/cpu.h
> +++ b/target/arm/cpu.h
> @@ -2740,6 +2740,7 @@ ARMMMUIdx 
> arm_v7m_mmu_idx_for_secstate_and_priv(CPUARMState *env,
>  ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate);
>
>  /* Determine the current mmu_idx to use for normal loads/stores */
> +ARMMMUIdx arm_mmu_idx(CPUARMState *env);
>  int cpu_mmu_index(CPUARMState *env, bool ifetch);

Could we give the new function its own comment rather than
making it share with the existing function, please?

Otherwise
Reviewed-by: Peter Maydell <address@hidden>

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]