hw/misc/allwinner-cpucfg: Remove use of ARM_CPU() cast macro
PATCH 1/1 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é <[email protected]>
--- hw/misc/allwinner-cpucfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/misc/allwinner-cpucfg.c +2 -2
@@ -84,7 +84,7 @@ static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, uint8_t cpu_id)trace_allwinner_cpucfg_cpu_reset (cpu_id, s->entry_addr); -ARMCPU *target_cpu =ARM_CPU (arm_get_cpu_by_id (cpu_id)); +CPUState *target_cpu =arm_get_cpu_by_id (cpu_id);if (!target_cpu) {/* * 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)*/ return ; } -bool target_aa64 =arm_feature (&target_cpu->env,ARM_FEATURE_AARCH64 ); +bool target_aa64 =arm_feature (cpu_env (target_cpu),ARM_FEATURE_AARCH64 ); ret =arm_set_cpu_on (cpu_id, s->entry_addr,0 ,CPU_EXCEPTION_LEVEL_ON_RESET , target_aa64);
Signature · 1 line
2.52.0
Quoted 22 lines · Philippe Mathieu-Daudé
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é <[email protected]>--- hw/misc/allwinner-cpucfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/misc/allwinner-cpucfg.c +1
-1@@ -84,7 +84,7 @@ static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, uint8_t cpu_id)trace_allwinner_cpucfg_cpu_reset (cpu_id, s->entry_addr); -ARMCPU *target_cpu =ARM_CPU (arm_get_cpu_by_id (cpu_id)); +CPUState *target_cpu =arm_get_cpu_by_id (cpu_id);if (!target_cpu) {/* * Called with a bogus value for cpu_id. Guest error will
hw/misc/allwinner-cpucfg.c static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, uint8_t cpu_id) · line 98
Quoted 8 lines
hw/misc/allwinner-cpucfg.c +1
-1@@ -92,7 +92,7 @@ static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, uint8_t cpu_id)*/ return ; } -bool target_aa64 =arm_feature (&target_cpu->env,ARM_FEATURE_AARCH64 ); +bool target_aa64 =arm_feature (cpu_env (target_cpu),ARM_FEATURE_AARCH64 ); ret =arm_set_cpu_on (cpu_id, s->entry_addr,0 ,CPU_EXCEPTION_LEVEL_ON_RESET , target_aa64);
Reviewed-by Richard Henderson <[email protected]>
r~
Peter Maydell
AppliedQuoted 6 lines · Philippe Mathieu-Daudé
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é <[email protected]>---
Applied to target-arm.next, thanks.
-- PMM