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/xtensa/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'target/xtensa') diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index c79dc75..f3ec66e 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -138,12 +138,11 @@ static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp) static void xtensa_cpu_initfn(Object *obj) { - CPUState *cs = CPU(obj); XtensaCPU *cpu = XTENSA_CPU(obj); XtensaCPUClass *xcc = XTENSA_CPU_GET_CLASS(obj); CPUXtensaState *env = &cpu->env; - cs->env_ptr = env; + cpu_set_cpustate_pointers(cpu); env->config = xcc->config; #ifndef CONFIG_USER_ONLY -- cgit v1.1