From a86cf967a1afe8ccbf58d34983816bc2985d65d2 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Thu, 23 Jan 2025 10:19:44 +0100 Subject: cpus: Have cpu_exec_initfn() per user / system emulation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Slighly simplify cpu-target.c again by extracting cpu_exec_initfn() to cpu-{system,user}.c, adding an empty stub for user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-19-philmd@linaro.org> --- cpu-target.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'cpu-target.c') diff --git a/cpu-target.c b/cpu-target.c index f4c834fd26..5aa6c4b0c6 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -24,7 +24,6 @@ #include "migration/vmstate.h" #ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" -#include "exec/address-spaces.h" #endif #include "system/accel-ops.h" #include "system/cpus.h" @@ -175,14 +174,6 @@ void cpu_exec_unrealizefn(CPUState *cpu) accel_cpu_common_unrealize(cpu); } -void cpu_exec_initfn(CPUState *cpu) -{ -#ifndef CONFIG_USER_ONLY - cpu->memory = get_system_memory(); - object_ref(OBJECT(cpu->memory)); -#endif -} - char *cpu_model_from_type(const char *typename) { const char *suffix = "-" CPU_RESOLVING_TYPE; -- cgit 1.4.1