@samitouri / QOSamiQemu / commits / e5b092fa92

target/arm: Pass aarch64_enabled to aarch64_aa32_a57_init

Invert aa32_only argument to what is actually used. Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260812204435.295067-4-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Richard Henderson committed Aug 18, 2026 at 10:39 UTC e5b092fa9251dec4f45f0f8a55ddd58f6cecac4d
3 files changed +5 -6
target/arm/cpu-max.c
+3 -4
@@ -16,10 +16,9 @@
16 #include "target/arm/internals.h"
17 #include "target/arm/cpregs.h"
18
19 -void aarch64_aa32_a57_init(ARMCPU *cpu, bool aa32_only)
19 +void aarch64_aa32_a57_init(ARMCPU *cpu, bool aarch64_enabled)
20 {
21 ARMISARegisters *isar = &cpu->isar;
22 - const bool aarch64_enabled = !aa32_only;
22
23 cpu->dtb_compatible = "arm,cortex-a57";
24 set_feature(&cpu->env, ARM_FEATURE_V8);
@@ -207,7 +206,7 @@ static void cpu_max_initfn(Object *obj)
206 * '-cpu max' for TCG: we currently do this as
207 * "A57 with extra things"
208 */
210 - aarch64_aa32_a57_init(cpu, !aarch64_enabled);
209 + aarch64_aa32_a57_init(cpu, aarch64_enabled);
210 if (!aarch64_enabled) {
211 aa32_max_features(cpu);
212 #ifdef CONFIG_USER_ONLY
@@ -227,7 +226,7 @@ static void cpu_max_initfn(Object *obj)
226
227 /* Ultimate fallback: -cpu max as cortex-a57. */
228 assert(qtest_enabled());
230 - aarch64_aa32_a57_init(cpu, !aarch64_enabled);
229 + aarch64_aa32_a57_init(cpu, aarch64_enabled);
230 }
231
232 static const ARMCPUInfo arm_max_cpu = {
target/arm/cpu64.c
+1 -1
@@ -688,7 +688,7 @@ void aarch64_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp)
688
689 static void aarch64_a57_initfn(Object *obj)
690 {
691 - aarch64_aa32_a57_init(ARM_CPU(obj), false);
691 + aarch64_aa32_a57_init(ARM_CPU(obj), true);
692 }
693
694 static void aarch64_a53_initfn(Object *obj)
target/arm/internals.h
+1 -1
@@ -1813,7 +1813,7 @@ void aarch64_max_tcg_initfn(Object *obj);
1813 void aarch64_add_pauth_properties(Object *obj);
1814 void aarch64_add_sve_properties(Object *obj);
1815 void aarch64_add_sme_properties(Object *obj);
1816 -void aarch64_aa32_a57_init(ARMCPU *cpu, bool aa32_only);
1816 +void aarch64_aa32_a57_init(ARMCPU *cpu, bool aa64_enabled);
1817 void aarch64_host_initfn(Object *obj);
1818
1819 /* Return true if the gdbstub is presenting an AArch64 CPU */