[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/18] hw/arm/bcm283x: Mark devices with no migratable fields
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 06/18] hw/arm/bcm283x: Mark devices with no migratable fields |
Date: |
Fri, 3 Jul 2020 22:18:59 +0200 |
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 | 7 ++++---
hw/arm/bcm2835_peripherals.c | 1 +
hw/arm/bcm2836.c | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h
index 024af8aae4..66e3621bb9 100644
--- a/include/hw/arm/bcm2836.h
+++ b/include/hw/arm/bcm2836.h
@@ -33,14 +33,15 @@ typedef struct BCM283XState {
DeviceState parent_obj;
/*< public >*/
- char *cpu_type;
- uint32_t enabled_cpus;
-
struct {
ARMCPU core;
} cpu[BCM283X_NCPUS];
BCM2836ControlState control;
BCM2835PeripheralState peripherals;
+
+ /* Properties */
+ char *cpu_type;
+ uint32_t enabled_cpus;
} BCM283XState;
typedef struct BCM283XInfo BCM283XInfo;
diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c
index 7ffdf62067..f33500dc27 100644
--- a/hw/arm/bcm2835_peripherals.c
+++ b/hw/arm/bcm2835_peripherals.c
@@ -401,6 +401,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 ed1793f7b7..5fc67b6777 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -173,6 +173,7 @@ static void bcm283x_class_init(ObjectClass *oc, void *data)
device_class_set_props(dc, bcm2836_props);
/* Reason: Must be wired up in code (see raspi_init() function) */
dc->user_creatable = false;
+ dc->vmsd = vmstate_qdev_no_state_to_migrate;
}
static const TypeInfo bcm283x_type_info = {
--
2.21.3
- [PATCH 00/18] hw: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 01/18] migration/vmstate: Document vmstate_dummy, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 02/18] migration/vmstate: Introduce vmstate_no_state_to_migrate, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 03/18] hw/core/qdev: Add vmstate_qdev_no_state_to_migrate, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 04/18] hw/arm/armv7m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 06/18] hw/arm/bcm283x: Mark devices with no migratable fields,
Philippe Mathieu-Daudé <=
- [PATCH 05/18] hw/arm/aspeed_soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 07/18] hw/arm/msf2-soc: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 08/18] hw/core/split-irq: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 09/18] hw/cpu/a9mpcore: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 10/18] hw/cpu/cluster: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 11/18] hw/usb/hcd-ohci: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 12/18] hw/intc/arm_gicv2m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 15/18] hw/misc/unimp: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 13/18] hw/misc/armsse-cpuid: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03