From patchwork Fri May 4 10:54:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 156909 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5C2C5B6FC5 for ; Fri, 4 May 2012 22:51:31 +1000 (EST) Received: from localhost ([::1]:35773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQGBa-0005xF-2K for incoming@patchwork.ozlabs.org; Fri, 04 May 2012 06:56:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQGAS-0003mK-2p for qemu-devel@nongnu.org; Fri, 04 May 2012 06:55:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQGAM-00042l-7B for qemu-devel@nongnu.org; Fri, 04 May 2012 06:55:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQGAL-00041j-V9 for qemu-devel@nongnu.org; Fri, 04 May 2012 06:55:14 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q44AtCrB007617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 May 2012 06:55:12 -0400 Received: from trasno.mitica (ovpn-116-82.ams2.redhat.com [10.36.116.82]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q44At31V021362; Fri, 4 May 2012 06:55:10 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 4 May 2012 12:54:32 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 05/35] vmstate: use new style for lm32 cpus X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- target-lm32/cpu.h | 2 -- target-lm32/machine.c | 14 ++------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/target-lm32/cpu.h b/target-lm32/cpu.h index 422a55b..049936a 100644 --- a/target-lm32/cpu.h +++ b/target-lm32/cpu.h @@ -205,8 +205,6 @@ void cpu_lm32_set_phys_msb_ignore(CPULM32State *env, int value); #define cpu_gen_code cpu_lm32_gen_code #define cpu_signal_handler cpu_lm32_signal_handler -#define CPU_SAVE_VERSION 1 - int cpu_lm32_handle_mmu_fault(CPULM32State *env, target_ulong address, int rw, int mmu_idx); #define cpu_handle_mmu_fault cpu_lm32_handle_mmu_fault diff --git a/target-lm32/machine.c b/target-lm32/machine.c index ed71bc4..24db6c0 100644 --- a/target-lm32/machine.c +++ b/target-lm32/machine.c @@ -3,10 +3,10 @@ const VMStateDescription vmstate_cpu = { .name = "cpu", - .version_id = CPU_SAVE_VERSION, + .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old = 1, - .fields = (VMStateField[]) { + .fields = (VMStateField[]) { VMSTATE_UINT32_ARRAY(regs, CPULM32State, 32), VMSTATE_UINT32(pc, CPULM32State), VMSTATE_UINT32(ie, CPULM32State), @@ -21,13 +21,3 @@ const VMStateDescription vmstate_cpu = { VMSTATE_END_OF_LIST() } }; - -void cpu_save(QEMUFile *f, void *opaque) -{ - vmstate_save_state(f, &vmstate_cpu, opaque); -} - -int cpu_load(QEMUFile *f, void *opaque, int version_id) -{ - return vmstate_load_state(f, &vmstate_cpu, opaque, version_id); -}