[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v16 84/99] target/arm: cpu-common: wrap a64-only check with is_a6
From: |
Alex Bennée |
Subject: |
[PATCH v16 84/99] target/arm: cpu-common: wrap a64-only check with is_a64 |
Date: |
Fri, 4 Jun 2021 16:52:57 +0100 |
From: Claudio Fontana <cfontana@suse.de>
now that is_a64() is just always false when !TARGET_AARCH64,
we can just use that instead of introducing a new ifdef.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
target/arm/cpu-common.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/target/arm/cpu-common.c b/target/arm/cpu-common.c
index b7a199a8d6..585223350f 100644
--- a/target/arm/cpu-common.c
+++ b/target/arm/cpu-common.c
@@ -305,9 +305,13 @@ uint64_t arm_sctlr(CPUARMState *env, int el)
{
/* Only EL0 needs to be adjusted for EL1&0 or EL2&0. */
if (el == 0) {
- ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, 0);
- el = (mmu_idx == ARMMMUIdx_E20_0 || mmu_idx == ARMMMUIdx_SE20_0)
- ? 2 : 1;
+ if (is_a64(env)) {
+ ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, 0);
+ el = (mmu_idx == ARMMMUIdx_E20_0 || mmu_idx == ARMMMUIdx_SE20_0)
+ ? 2 : 1;
+ } else {
+ el = 1;
+ }
}
return env->cp15.sctlr_el[el];
}
--
2.20.1
- [PATCH v16 28/99] target/arm: split cpregs from tcg/helper.c, (continued)
- [PATCH v16 58/99] target/arm: move kvm-const.h, kvm.c, kvm64.c, kvm_arm.h to kvm/, Alex Bennée, 2021/06/04
- [PATCH v16 85/99] target/arm: cpu-pauth: new module for ARMv8.3 Pointer Authentication, Alex Bennée, 2021/06/04
- [PATCH v16 60/99] target/arm: cleanup cpu includes, Alex Bennée, 2021/06/04
- [PATCH v16 84/99] target/arm: cpu-common: wrap a64-only check with is_a64,
Alex Bennée <=
- [PATCH v16 25/99] target/arm: tcg: fix comment style before move to cpu-mmu, Alex Bennée, 2021/06/04
- [PATCH v16 71/99] target/arm: cpu-sve: new module, Alex Bennée, 2021/06/04
- [PATCH v16 59/99] MAINTAINERS: update arm kvm maintained files to all in target/arm/kvm/, Alex Bennée, 2021/06/04
- [PATCH v16 24/99] target/arm: split off cpu-sysemu.c, Alex Bennée, 2021/06/04
- [PATCH v16 69/99] target/arm: add tcg cpu accel class, Alex Bennée, 2021/06/04