@samitouri / QOSamiQemu / commits / e0be954ff6

hw/misc/allwinner-cpucfg: Remove use of ARM_CPU() cast macro

allwinner_cpucfg_cpu_reset() doesn't access ARM CPU internal fields: no need to cast, pass a generic CPU pointer along. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260225034720.41495-1-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Philippe Mathieu-Daudé committed Feb 26, 2026 at 11:27 UTC e0be954ff62572f9715e9ce2c283b87054a94cc8
1 file changed +2 -2
hw/misc/allwinner-cpucfg.c
+2 -2
@@ -84,7 +84,7 @@ static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, uint8_t cpu_id)
84
85 trace_allwinner_cpucfg_cpu_reset(cpu_id, s->entry_addr);
86
87 - ARMCPU *target_cpu = ARM_CPU(arm_get_cpu_by_id(cpu_id));
87 + CPUState *target_cpu = arm_get_cpu_by_id(cpu_id);
88 if (!target_cpu) {
89 /*
90 * Called with a bogus value for cpu_id. Guest error will
@@ -92,7 +92,7 @@ static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, uint8_t cpu_id)
92 */
93 return;
94 }
95 - bool target_aa64 = arm_feature(&target_cpu->env, ARM_FEATURE_AARCH64);
95 + bool target_aa64 = arm_feature(cpu_env(target_cpu), ARM_FEATURE_AARCH64);
96
97 ret = arm_set_cpu_on(cpu_id, s->entry_addr, 0,
98 CPU_EXCEPTION_LEVEL_ON_RESET, target_aa64);