[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v13 72/80] target/arm: cpu-common: wrap a64-only check with is_a64
From: |
Claudio Fontana |
Subject: |
[RFC v13 72/80] target/arm: cpu-common: wrap a64-only check with is_a64 |
Date: |
Wed, 14 Apr 2021 13:26:42 +0200 |
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>
---
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.26.2
- [RFC v13 60/80] target/arm: cpu-sve: rename functions according to module prefix, (continued)
- [RFC v13 60/80] target/arm: cpu-sve: rename functions according to module prefix, Claudio Fontana, 2021/04/14
- [RFC v13 61/80] target/arm: cpu-sve: split TCG and KVM functionality, Claudio Fontana, 2021/04/14
- [RFC v13 54/80] Revert "target/arm: Restrict v8M IDAU to TCG", Claudio Fontana, 2021/04/14
- [RFC v13 56/80] target/arm: move kvm post init initialization to kvm cpu accel, Claudio Fontana, 2021/04/14
- [RFC v13 57/80] target/arm: add tcg cpu accel class, Claudio Fontana, 2021/04/14
- [RFC v13 59/80] target/arm: cpu-sve: new module, Claudio Fontana, 2021/04/14
- [RFC v13 65/80] target/arm: arch_dump: restrict ELFCLASS64 to AArch64, Claudio Fontana, 2021/04/14
- [RFC v13 62/80] target/arm: cpu-sve: make cpu_sve_finalize_features return bool, Claudio Fontana, 2021/04/14
- [RFC v13 70/80] target/arm: move sve_zcr_len_for_el to TARGET_AARCH64-only cpu-sve, Claudio Fontana, 2021/04/14
- [RFC v13 69/80] target/arm: tcg-sve: rename the narrow_vq and change_el functions, Claudio Fontana, 2021/04/14
- [RFC v13 72/80] target/arm: cpu-common: wrap a64-only check with is_a64,
Claudio Fontana <=
- [RFC v13 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features, Claudio Fontana, 2021/04/14
- [RFC v13 79/80] target/arm: tcg: remove superfluous CONFIG_TCG check, Claudio Fontana, 2021/04/14
- [RFC v13 71/80] cpu-sve: rename sve_zcr_len_for_el to cpu_sve_get_zcr_len_for_el, Claudio Fontana, 2021/04/14
- [RFC v13 58/80] target/arm: move TCG gt timer creation code in tcg/, Claudio Fontana, 2021/04/14
- [RFC v13 63/80] target/arm: make is_aa64 and arm_el_is_aa64 a macro for !TARGET_AARCH64, Claudio Fontana, 2021/04/14
- [RFC v13 64/80] target/arm: restrict rebuild_hflags_a64 to TARGET_AARCH64, Claudio Fontana, 2021/04/14
- [RFC v13 74/80] target/arm: cpu-pauth: change arm_cpu_pauth_finalize name and sig, Claudio Fontana, 2021/04/14
- [RFC v13 66/80] target/arm: cpu-exceptions, cpu-exceptions-aa64: new modules, Claudio Fontana, 2021/04/14
- [RFC v13 76/80] target/arm: cpu64: rename arm_cpu_finalize_features, Claudio Fontana, 2021/04/14
- [RFC v13 75/80] target/arm: move arm_cpu_finalize_features into cpu64, Claudio Fontana, 2021/04/14