@samitouri / QOSamiQemu / commits / 9caff83f5b

target/arm: Pass ARMCPU to aarch64_aa32_a57_init

There's no reason to pass Object when ARMCPU is more appropriate. Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260812204435.295067-3-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 9caff83f5b976da8285db55d363e861675e79777
3 files changed +5 -6
target/arm/cpu-max.c
+3 -4
@@ -16,9 +16,8 @@
16 #include "target/arm/internals.h"
17 #include "target/arm/cpregs.h"
18
19 -void aarch64_aa32_a57_init(Object *obj, bool aa32_only)
19 +void aarch64_aa32_a57_init(ARMCPU *cpu, bool aa32_only)
20 {
21 - ARMCPU *cpu = ARM_CPU(obj);
21 ARMISARegisters *isar = &cpu->isar;
22 const bool aarch64_enabled = !aa32_only;
23
@@ -208,7 +207,7 @@ static void cpu_max_initfn(Object *obj)
207 * '-cpu max' for TCG: we currently do this as
208 * "A57 with extra things"
209 */
211 - aarch64_aa32_a57_init(obj, !aarch64_enabled);
210 + aarch64_aa32_a57_init(cpu, !aarch64_enabled);
211 if (!aarch64_enabled) {
212 aa32_max_features(cpu);
213 #ifdef CONFIG_USER_ONLY
@@ -228,7 +227,7 @@ static void cpu_max_initfn(Object *obj)
227
228 /* Ultimate fallback: -cpu max as cortex-a57. */
229 assert(qtest_enabled());
231 - aarch64_aa32_a57_init(obj, !aarch64_enabled);
230 + aarch64_aa32_a57_init(cpu, !aarch64_enabled);
231 }
232
233 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(obj, false);
691 + aarch64_aa32_a57_init(ARM_CPU(obj), false);
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(Object *obj, bool aa32_only);
1816 +void aarch64_aa32_a57_init(ARMCPU *cpu, bool aa32_only);
1817 void aarch64_host_initfn(Object *obj);
1818
1819 /* Return true if the gdbstub is presenting an AArch64 CPU */