From 7506ed902eb97fe4e2a1dd16766c621d32ecc40d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 28 Mar 2019 11:26:22 -1000 Subject: cpu: Introduce cpu_set_cpustate_pointers Consolidate some boilerplate from foo_cpu_initfn. Reviewed-by: Alistair Francis Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/ppc/translate_init.inc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'target/ppc/translate_init.inc.c') diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c index d161e95..b71b7ba 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -10473,12 +10473,11 @@ static bool ppc_cpu_is_big_endian(CPUState *cs) static void ppc_cpu_instance_init(Object *obj) { - CPUState *cs = CPU(obj); PowerPCCPU *cpu = POWERPC_CPU(obj); PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); CPUPPCState *env = &cpu->env; - cs->env_ptr = env; + cpu_set_cpustate_pointers(cpu); cpu->vcpu_id = UNASSIGNED_CPU_INDEX; env->msr_mask = pcc->msr_mask; -- cgit v1.1