From 55c3ceef61fcf06fc98ddc752b7cce788ce7680b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 15 Oct 2017 19:02:42 -0700 Subject: qom: Introduce CPUClass.tcg_initialize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move target cpu tcg initialization to common code, called from cpu_exec_realizefn. Acked-by: Andreas Färber Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/s390x/cpu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'target/s390x/cpu.c') diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 95f4283..824dfd6 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -241,7 +241,6 @@ static void s390_cpu_initfn(Object *obj) CPUState *cs = CPU(obj); S390CPU *cpu = S390_CPU(obj); CPUS390XState *env = &cpu->env; - static bool inited; #if !defined(CONFIG_USER_ONLY) struct tm tm; #endif @@ -259,11 +258,6 @@ static void s390_cpu_initfn(Object *obj) env->cpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu); s390_cpu_set_state(CPU_STATE_STOPPED, cpu); #endif - - if (tcg_enabled() && !inited) { - inited = true; - s390x_translate_init(); - } } static void s390_cpu_finalize(Object *obj) @@ -503,6 +497,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) #endif #endif cc->disas_set_info = s390_cpu_disas_set_info; + cc->tcg_initialize = s390x_translate_init; cc->gdb_num_core_regs = S390_NUM_CORE_REGS; cc->gdb_core_xml_file = "s390x-core64.xml"; -- cgit v1.1