From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STdWr-00081W-5o for qemu-devel@nongnu.org; Sun, 13 May 2012 14:28:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STdWp-0007Yt-BN for qemu-devel@nongnu.org; Sun, 13 May 2012 14:28:24 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38472 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STdWp-0007YR-5m for qemu-devel@nongnu.org; Sun, 13 May 2012 14:28:23 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 13 May 2012 20:27:45 +0200 Message-Id: <1336933665-3867-8-git-send-email-afaerber@suse.de> In-Reply-To: <1336933665-3867-1-git-send-email-afaerber@suse.de> References: <1336933665-3867-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 7/7] mips_fulong2e: Don't register "cpu" VMState twice List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws, Juan Quintela From: Juan Quintela We have the following simplified callgraph in mips_fulong2e_init(): cpu_init() =3D> 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=C3=A4rber --- hw/mips_fulong2e.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index 37dc711..1a8df10 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, c= onst char *boot_device, exit(1); } =20 - register_savevm(NULL, "cpu", 0, 3, cpu_save, cpu_load, env); qemu_register_reset(main_cpu_reset, env); =20 /* fulong 2e has 256M ram. */ --=20 1.7.7