mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target: Replace CPU_GET_CLASS(cpu -> obj) in cpu_reset_hold() handler
Since CPU() macro is a simple cast, the following are equivalent: Object *obj; CPUState *cs = CPU(obj) In order to ease static analysis when running scripts/coccinelle/cpu_env.cocci from the previous commit, replace: - CPU_GET_CLASS(cpu); + CPU_GET_CLASS(obj); Most code use the 'cs' variable name for CPUState handle. Replace few 's' -> 'cs' to unify cpu_reset_hold() style. No logical change in this patch. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240129164514.73104-7-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
94956d7b51
commit
348802b526
18 changed files with 51 additions and 51 deletions
|
@ -214,9 +214,9 @@ static void cp_reg_check_reset(gpointer key, gpointer value, gpointer opaque)
|
|||
|
||||
static void arm_cpu_reset_hold(Object *obj)
|
||||
{
|
||||
CPUState *s = CPU(obj);
|
||||
ARMCPU *cpu = ARM_CPU(s);
|
||||
ARMCPUClass *acc = ARM_CPU_GET_CLASS(cpu);
|
||||
CPUState *cs = CPU(obj);
|
||||
ARMCPU *cpu = ARM_CPU(cs);
|
||||
ARMCPUClass *acc = ARM_CPU_GET_CLASS(obj);
|
||||
CPUARMState *env = &cpu->env;
|
||||
|
||||
if (acc->parent_phases.hold) {
|
||||
|
@ -233,7 +233,7 @@ static void arm_cpu_reset_hold(Object *obj)
|
|||
env->vfp.xregs[ARM_VFP_MVFR1] = cpu->isar.mvfr1;
|
||||
env->vfp.xregs[ARM_VFP_MVFR2] = cpu->isar.mvfr2;
|
||||
|
||||
cpu->power_state = s->start_powered_off ? PSCI_OFF : PSCI_ON;
|
||||
cpu->power_state = cs->start_powered_off ? PSCI_OFF : PSCI_ON;
|
||||
|
||||
if (arm_feature(env, ARM_FEATURE_IWMMXT)) {
|
||||
env->iwmmxt.cregs[ARM_IWMMXT_wCID] = 0x69051000 | 'Q';
|
||||
|
@ -438,7 +438,7 @@ static void arm_cpu_reset_hold(Object *obj)
|
|||
|
||||
/* Load the initial SP and PC from offset 0 and 4 in the vector table */
|
||||
vecbase = env->v7m.vecbase[env->v7m.secure];
|
||||
rom = rom_ptr_for_as(s->as, vecbase, 8);
|
||||
rom = rom_ptr_for_as(cs->as, vecbase, 8);
|
||||
if (rom) {
|
||||
/* Address zero is covered by ROM which hasn't yet been
|
||||
* copied into physical memory.
|
||||
|
@ -451,8 +451,8 @@ static void arm_cpu_reset_hold(Object *obj)
|
|||
* it got copied into memory. In the latter case, rom_ptr
|
||||
* will return a NULL pointer and we should use ldl_phys instead.
|
||||
*/
|
||||
initial_msp = ldl_phys(s->as, vecbase);
|
||||
initial_pc = ldl_phys(s->as, vecbase + 4);
|
||||
initial_msp = ldl_phys(cs->as, vecbase);
|
||||
initial_pc = ldl_phys(cs->as, vecbase + 4);
|
||||
}
|
||||
|
||||
qemu_log_mask(CPU_LOG_INT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue