[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 05/20] hw/arm/bcm283x: Mark devices with no migratable fie
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH v2 05/20] hw/arm/bcm283x: Mark devices with no migratable fields |
Date: |
Sun, 17 Jan 2021 20:24:31 +0100 |
These devices don't have fields to migrate. Be explicit
by using vmstate_qdev_no_state_to_migrate.
Add a more descriptive comment to keep a clear separation
between static property vs runtime changeable.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/arm/bcm2836.h | 5 +++--
hw/arm/bcm2835_peripherals.c | 1 +
hw/arm/bcm2836.c | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h
index 6f90cabfa3a..becb6cfd0a7 100644
--- a/include/hw/arm/bcm2836.h
+++ b/include/hw/arm/bcm2836.h
@@ -35,13 +35,14 @@ struct BCM283XState {
DeviceState parent_obj;
/*< public >*/
- uint32_t enabled_cpus;
-
struct {
ARMCPU core;
} cpu[BCM283X_NCPUS];
BCM2836ControlState control;
BCM2835PeripheralState peripherals;
+
+ /* Properties */
+ uint32_t enabled_cpus;
};
#endif /* BCM2836_H */
diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c
index dcff13433e5..8cf85f028fd 100644
--- a/hw/arm/bcm2835_peripherals.c
+++ b/hw/arm/bcm2835_peripherals.c
@@ -386,6 +386,7 @@ static void bcm2835_peripherals_class_init(ObjectClass *oc,
void *data)
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = bcm2835_peripherals_realize;
+ dc->vmsd = vmstate_qdev_no_state_to_migrate;
}
static const TypeInfo bcm2835_peripherals_type_info = {
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index de7ade2878e..d2de99147cc 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -176,6 +176,7 @@ static void bcm283x_class_init(ObjectClass *oc, void *data)
/* Reason: Must be wired up in code (see raspi_init() function) */
dc->user_creatable = false;
+ dc->vmsd = vmstate_qdev_no_state_to_migrate;
}
static void bcm2835_class_init(ObjectClass *oc, void *data)
--
2.26.2
- Re: [RFC PATCH v2 01/20] migration/vmstate: Restrict vmstate_dummy to user-mode, (continued)
[RFC PATCH v2 02/20] hw/core/qdev: Add vmstate_qdev_no_state_to_migrate, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 04/20] hw/arm/aspeed_soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 03/20] hw/arm/armv7m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 05/20] hw/arm/bcm283x: Mark devices with no migratable fields,
Philippe Mathieu-Daudé <=
[RFC PATCH v2 06/20] hw/arm/msf2-soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 07/20] hw/core/split-irq: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 09/20] hw/cpu/cluster: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 08/20] hw/cpu/a9mpcore: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 10/20] hw/usb/hcd-ohci: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 11/20] hw/intc/arm_gicv2m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 12/20] hw/misc/armsse-cpuid: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 13/20] hw/misc/iotkit-sysinfo: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17
[RFC PATCH v2 14/20] hw/misc/unimp: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2021/01/17