From 0c9dfe460d0c239cc0dc78d6223118cb63261b45 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Sun, 13 May 2012 19:32:54 +0200 Subject: [PATCH] mips_fulong2e: Don't register "cpu" VMState twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have the following simplified callgraph in mips_fulong2e_init(): cpu_init() => cpu_mips_init() object_new() mips_cpu_initfn() cpu_exec_init() register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION, cpu_save, cpu_load, env) register_savevm(NULL, "cpu", 0, 3, cpu_save, cpu_load, env) CPU_SAVE_VERSION is defined as 3 in target-mips/cpu.h. fulong2e instantiates one CPU, so its cpu_index is 0. Thus the two are fully identical. Therefore just remove the second call in fulong2e. Signed-off-by: Juan Quintela [AF: Extend explanation in commit message] Signed-off-by: Andreas Färber --- hw/mips_fulong2e.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index 37dc711e08..1a8df10429 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -284,7 +284,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, exit(1); } - register_savevm(NULL, "cpu", 0, 3, cpu_save, cpu_load, env); qemu_register_reset(main_cpu_reset, env); /* fulong 2e has 256M ram. */ -- GitLab