提交 0c9dfe46 编写于 作者: J Juan Quintela 提交者: Andreas Färber

mips_fulong2e: Don't register "cpu" VMState twice

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: NJuan Quintela <quintela@redhat.com>
[AF: Extend explanation in commit message]
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 c115cd65
......@@ -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. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册