integratorcp: Don't migrate flash using vmstate_register_ram_global()
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Jul 2017 16:56:12 +0000 (17:56 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Jul 2017 16:59:28 +0000 (17:59 +0100)
Instead of migrating the flash by creating the memory region
with memory_region_init_ram_nomigrate() and then calling
vmstate_register_ram_global(), just use memory_region_init_ram(),
which now handles migration registration automatically.

This is a migration compatibility break for the integratorcp
board, because the RAM region's migration name changes to
include the device path. This is OK because we don't guarantee
migration compatibility for this board.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1500310341-28931-1-git-send-email-peter.maydell@linaro.org

hw/arm/integratorcp.c

index d79221d1663e8b2db6920a7773b568ea457a8c0c..d9530edffc6c942649650ab0bf520a42e397051d 100644 (file)
@@ -276,9 +276,8 @@ static void integratorcm_init(Object *obj)
     s->cm_init = 0x00000112;
     s->cm_refcnt_offset = muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), 24,
                                    1000);
-    memory_region_init_ram_nomigrate(&s->flash, obj, "integrator.flash", 0x100000,
+    memory_region_init_ram(&s->flash, obj, "integrator.flash", 0x100000,
                            &error_fatal);
-    vmstate_register_ram_global(&s->flash);
 
     memory_region_init_io(&s->iomem, obj, &integratorcm_ops, s,
                           "integratorcm", 0x00800000);