diff mbox

[05/35] vmstate: use new style for lm32 cpus

Message ID c135abdabad7db5eb188d0c39a42ccb60f830a03.1336128412.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela May 4, 2012, 10:54 a.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 target-lm32/cpu.h     |    2 --
 target-lm32/machine.c |   14 ++------------
 2 files changed, 2 insertions(+), 14 deletions(-)
diff mbox

Patch

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);
-}