diff options
| author | Richard Henderson | 2019-01-21 11:23:12 +0100 |
|---|---|---|
| committer | Peter Maydell | 2019-01-21 11:38:54 +0100 |
| commit | 50494a279dab22a015aba9501a94fcc3cd52140e (patch) | |
| tree | 0a2d2ab7d036d1c21606e7399ba04440eff54e19 /target/arm/internals.h | |
| parent | target/arm: Move cpu_mmu_index out of line (diff) | |
| download | qemu-50494a279dab22a015aba9501a94fcc3cd52140e.tar.gz qemu-50494a279dab22a015aba9501a94fcc3cd52140e.tar.xz qemu-50494a279dab22a015aba9501a94fcc3cd52140e.zip | |
target/arm: Introduce arm_mmu_idx
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.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190108223129.5570-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/internals.h')
| -rw-r--r-- | target/arm/internals.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/arm/internals.h b/target/arm/internals.h index 0ed20c03cc..89f3b122a4 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -919,4 +919,12 @@ void arm_cpu_update_virq(ARMCPU *cpu); */ void arm_cpu_update_vfiq(ARMCPU *cpu); +/** + * arm_mmu_idx: + * @env: The cpu environment + * + * Return the full ARMMMUIdx for the current translation regime. + */ +ARMMMUIdx arm_mmu_idx(CPUARMState *env); + #endif |
