Blame SOURCES/kvm-sysbus-Set-cannot_instantiate_with_device_add_yet.patch

218e99
From a44e7ab97ff7ed0494ba8746c73aa66afa506ef4 Mon Sep 17 00:00:00 2001
218e99
From: Kevin Wolf <kwolf@redhat.com>
218e99
Date: Wed, 6 Nov 2013 14:41:13 +0100
218e99
Subject: [PATCH 37/81] sysbus: Set cannot_instantiate_with_device_add_yet
218e99
218e99
RH-Author: Kevin Wolf <kwolf@redhat.com>
218e99
Message-id: <1383748882-22831-9-git-send-email-kwolf@redhat.com>
218e99
Patchwork-id: 55534
218e99
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 08/17] sysbus: Set cannot_instantiate_with_device_add_yet
218e99
Bugzilla: 1001216
218e99
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
218e99
From: Markus Armbruster <armbru@redhat.com>
218e99
218e99
device_add plugs devices into suitable bus.  For "real" buses, that
218e99
actually connects the device.  For sysbus, the connections need to be
218e99
made separately, and device_add can't do that.  The device would be
218e99
left unconnected, and could not possibly work.
218e99
218e99
Quite a few, but not all sysbus devices already set
218e99
cannot_instantiate_with_device_add_yet in their class init function.
218e99
218e99
Set it in their abstract base's class init function
218e99
sysbus_device_class_init(), and remove the now redundant assignments
218e99
from device class init functions.
218e99
218e99
Signed-off-by: Markus Armbruster <armbru@redhat.com>
218e99
Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
218e99
(cherry picked from pending upstream submission)
218e99
218e99
Conflicts:
218e99
	hw/dma/pl080.c
218e99
	hw/i386/kvm/clock.c
218e99
	hw/nvram/fw_cfg.c
218e99
	hw/pci-host/piix.c
218e99
	hw/timer/hpet.c
218e99
218e99
Conflict resolution is always the same: drop redundant assignment,
218e99
keep context intact.  Three additional redundant assignments dropped
218e99
in hw/display/pl110.c and hw/dma/pl080.c.
218e99
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
218e99
---
218e99
 hw/alpha/typhoon.c         | 2 --
218e99
 hw/arm/versatilepb.c       | 1 -
218e99
 hw/audio/pl041.c           | 1 -
218e99
 hw/core/sysbus.c           | 7 +++++++
218e99
 hw/display/pl110.c         | 3 ---
218e99
 hw/dma/pl080.c             | 2 --
218e99
 hw/i386/kvm/clock.c        | 1 -
218e99
 hw/i386/kvmvapic.c         | 1 -
218e99
 hw/intc/arm_gic.c          | 1 -
218e99
 hw/intc/arm_gic_common.c   | 1 -
218e99
 hw/intc/arm_gic_kvm.c      | 1 -
218e99
 hw/intc/ioapic_common.c    | 1 -
218e99
 hw/intc/pl190.c            | 1 -
218e99
 hw/isa/isa-bus.c           | 1 -
218e99
 hw/misc/arm_l2x0.c         | 1 -
218e99
 hw/nvram/fw_cfg.c          | 1 -
218e99
 hw/pci-host/bonito.c       | 2 --
218e99
 hw/pci-host/grackle.c      | 2 --
218e99
 hw/pci-host/piix.c         | 1 -
218e99
 hw/pci-host/prep.c         | 1 -
218e99
 hw/ppc/spapr_vio.c         | 2 --
218e99
 hw/s390x/ipl.c             | 1 -
218e99
 hw/s390x/s390-virtio-bus.c | 2 --
218e99
 hw/s390x/virtio-ccw.c      | 2 --
218e99
 hw/sd/pl181.c              | 1 -
218e99
 hw/timer/arm_mptimer.c     | 1 -
218e99
 hw/timer/hpet.c            | 1 -
218e99
 hw/timer/pl031.c           | 1 -
218e99
 28 files changed, 7 insertions(+), 36 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 hw/alpha/typhoon.c         |    2 --
218e99
 hw/arm/versatilepb.c       |    1 -
218e99
 hw/audio/pl041.c           |    1 -
218e99
 hw/core/sysbus.c           |    7 +++++++
218e99
 hw/display/pl110.c         |    3 ---
218e99
 hw/dma/pl080.c             |    2 --
218e99
 hw/i386/kvm/clock.c        |    1 -
218e99
 hw/i386/kvmvapic.c         |    1 -
218e99
 hw/intc/arm_gic.c          |    1 -
218e99
 hw/intc/arm_gic_common.c   |    1 -
218e99
 hw/intc/arm_gic_kvm.c      |    1 -
218e99
 hw/intc/ioapic_common.c    |    1 -
218e99
 hw/intc/pl190.c            |    1 -
218e99
 hw/isa/isa-bus.c           |    1 -
218e99
 hw/misc/arm_l2x0.c         |    1 -
218e99
 hw/nvram/fw_cfg.c          |    1 -
218e99
 hw/pci-host/bonito.c       |    2 --
218e99
 hw/pci-host/grackle.c      |    2 --
218e99
 hw/pci-host/piix.c         |    1 -
218e99
 hw/pci-host/prep.c         |    1 -
218e99
 hw/ppc/spapr_vio.c         |    2 --
218e99
 hw/s390x/ipl.c             |    1 -
218e99
 hw/s390x/s390-virtio-bus.c |    2 --
218e99
 hw/s390x/virtio-ccw.c      |    2 --
218e99
 hw/sd/pl181.c              |    1 -
218e99
 hw/timer/arm_mptimer.c     |    1 -
218e99
 hw/timer/hpet.c            |    1 -
218e99
 hw/timer/pl031.c           |    1 -
218e99
 28 files changed, 7 insertions(+), 36 deletions(-)
218e99
218e99
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
218e99
index 55a0e76..070c34b 100644
218e99
--- a/hw/alpha/typhoon.c
218e99
+++ b/hw/alpha/typhoon.c
218e99
@@ -819,11 +819,9 @@ static int typhoon_pcihost_init(SysBusDevice *dev)
218e99
 
218e99
 static void typhoon_pcihost_class_init(ObjectClass *klass, void *data)
218e99
 {
218e99
-    DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = typhoon_pcihost_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo typhoon_pcihost_info = {
218e99
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
218e99
index 84cd1ed..adc7a5d 100644
218e99
--- a/hw/arm/versatilepb.c
218e99
+++ b/hw/arm/versatilepb.c
218e99
@@ -387,7 +387,6 @@ static void vpb_sic_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = vpb_sic_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_vpb_sic;
218e99
 }
218e99
 
218e99
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
218e99
index 36a7ecb..227ddf9 100644
218e99
--- a/hw/audio/pl041.c
218e99
+++ b/hw/audio/pl041.c
218e99
@@ -627,7 +627,6 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl041_init;
218e99
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = pl041_device_reset;
218e99
     dc->vmsd = &vmstate_pl041;
218e99
     dc->props = pl041_device_properties;
218e99
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
218e99
index 9004d8c..e07f1c4 100644
218e99
--- a/hw/core/sysbus.c
218e99
+++ b/hw/core/sysbus.c
218e99
@@ -257,6 +257,13 @@ static void sysbus_device_class_init(ObjectClass *klass, void *data)
218e99
     DeviceClass *k = DEVICE_CLASS(klass);
218e99
     k->init = sysbus_device_init;
218e99
     k->bus_type = TYPE_SYSTEM_BUS;
218e99
+    /*
218e99
+     * device_add plugs devices into suitable bus.  For "real" buses,
218e99
+     * that actually connects the device.  For sysbus, the connections
218e99
+     * need to be made separately, and device_add can't do that.  The
218e99
+     * device would be left unconncected, and could not possibly work.
218e99
+     */
218e99
+    k->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo sysbus_device_type_info = {
218e99
diff --git a/hw/display/pl110.c b/hw/display/pl110.c
218e99
index 173ddf8..f4acf78 100644
218e99
--- a/hw/display/pl110.c
218e99
+++ b/hw/display/pl110.c
218e99
@@ -482,7 +482,6 @@ static void pl110_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl110_init;
218e99
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl110;
218e99
 }
218e99
 
218e99
@@ -500,7 +499,6 @@ static void pl110_versatile_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl110_versatile_init;
218e99
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl110;
218e99
 }
218e99
 
218e99
@@ -518,7 +516,6 @@ static void pl111_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl111_init;
218e99
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl110;
218e99
 }
218e99
 
218e99
diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
218e99
index 2920780..e00ccdb 100644
218e99
--- a/hw/dma/pl080.c
218e99
+++ b/hw/dma/pl080.c
218e99
@@ -382,7 +382,6 @@ static void pl080_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl080_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl080;
218e99
 }
218e99
 
218e99
@@ -399,7 +398,6 @@ static void pl081_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl081_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl080;
218e99
 }
218e99
 
218e99
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
218e99
index 6204939..6d6f3a7 100644
218e99
--- a/hw/i386/kvm/clock.c
218e99
+++ b/hw/i386/kvm/clock.c
218e99
@@ -110,7 +110,6 @@ static void kvmclock_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = kvmclock_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &kvmclock_vmsd;
218e99
 }
218e99
 
218e99
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
218e99
index e6405da..a7db94d 100644
218e99
--- a/hw/i386/kvmvapic.c
218e99
+++ b/hw/i386/kvmvapic.c
218e99
@@ -809,7 +809,6 @@ static void vapic_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *sc = SYS_BUS_DEVICE_CLASS(klass);
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
 
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset   = vapic_reset;
218e99
     dc->vmsd    = &vmstate_vapic;
218e99
     sc->init    = vapic_init;
218e99
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
218e99
index 243cbf1..8c72437 100644
218e99
--- a/hw/intc/arm_gic.c
218e99
+++ b/hw/intc/arm_gic.c
218e99
@@ -702,7 +702,6 @@ static void arm_gic_class_init(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ARMGICClass *agc = ARM_GIC_CLASS(klass);
218e99
 
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     agc->parent_realize = dc->realize;
218e99
     dc->realize = arm_gic_realize;
218e99
 }
218e99
diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
218e99
index 26b7756..0192537 100644
218e99
--- a/hw/intc/arm_gic_common.c
218e99
+++ b/hw/intc/arm_gic_common.c
218e99
@@ -156,7 +156,6 @@ static void arm_gic_common_class_init(ObjectClass *klass, void *data)
218e99
     dc->realize = arm_gic_common_realize;
218e99
     dc->props = arm_gic_common_properties;
218e99
     dc->vmsd = &vmstate_gic;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo arm_gic_common_type = {
218e99
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
218e99
index cb4ce23..9b8a106 100644
218e99
--- a/hw/intc/arm_gic_kvm.c
218e99
+++ b/hw/intc/arm_gic_kvm.c
218e99
@@ -148,7 +148,6 @@ static void kvm_arm_gic_class_init(ObjectClass *klass, void *data)
218e99
     kgc->parent_reset = dc->reset;
218e99
     dc->realize = kvm_arm_gic_realize;
218e99
     dc->reset = kvm_arm_gic_reset;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo kvm_arm_gic_info = {
218e99
diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c
218e99
index ce610b7..8e555de 100644
218e99
--- a/hw/intc/ioapic_common.c
218e99
+++ b/hw/intc/ioapic_common.c
218e99
@@ -100,7 +100,6 @@ static void ioapic_common_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     sc->init = ioapic_init_common;
218e99
     dc->vmsd = &vmstate_ioapic_common;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo ioapic_common_type = {
218e99
diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c
218e99
index ff0e5b0..2cda150 100644
218e99
--- a/hw/intc/pl190.c
218e99
+++ b/hw/intc/pl190.c
218e99
@@ -269,7 +269,6 @@ static void pl190_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl190_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = pl190_reset;
218e99
     dc->vmsd = &vmstate_pl190;
218e99
 }
218e99
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
218e99
index a87a841..3471d0f 100644
218e99
--- a/hw/isa/isa-bus.c
218e99
+++ b/hw/isa/isa-bus.c
218e99
@@ -217,7 +217,6 @@ static void isabus_bridge_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = isabus_bridge_init;
218e99
     dc->fw_name = "isa";
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo isabus_bridge_info = {
218e99
diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c
218e99
index 2b19e34..21bf291 100644
218e99
--- a/hw/misc/arm_l2x0.c
218e99
+++ b/hw/misc/arm_l2x0.c
218e99
@@ -174,7 +174,6 @@ static void l2x0_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = l2x0_priv_init;
218e99
     dc->vmsd = &vmstate_l2x0;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = l2x0_properties;
218e99
     dc->reset = l2x0_priv_reset;
218e99
 }
218e99
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
218e99
index 155edd4..3fa1488 100644
218e99
--- a/hw/nvram/fw_cfg.c
218e99
+++ b/hw/nvram/fw_cfg.c
218e99
@@ -559,7 +559,6 @@ static void fw_cfg_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = fw_cfg_init1;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = fw_cfg_reset;
218e99
     dc->vmsd = &vmstate_fw_cfg;
218e99
     dc->props = fw_cfg_properties;
218e99
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
218e99
index b73359e..c2a056a 100644
218e99
--- a/hw/pci-host/bonito.c
218e99
+++ b/hw/pci-host/bonito.c
218e99
@@ -824,11 +824,9 @@ static const TypeInfo bonito_info = {
218e99
 
218e99
 static void bonito_pcihost_class_init(ObjectClass *klass, void *data)
218e99
 {
218e99
-    DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = bonito_pcihost_initfn;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo bonito_pcihost_info = {
218e99
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
218e99
index 5eb2840..4643beb 100644
218e99
--- a/hw/pci-host/grackle.c
218e99
+++ b/hw/pci-host/grackle.c
218e99
@@ -143,10 +143,8 @@ static const TypeInfo grackle_pci_info = {
218e99
 static void pci_grackle_class_init(ObjectClass *klass, void *data)
218e99
 {
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
-    DeviceClass *dc = DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pci_grackle_init_device;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo grackle_pci_host_info = {
218e99
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
218e99
index b9c2dcf..20cc682 100644
218e99
--- a/hw/pci-host/piix.c
218e99
+++ b/hw/pci-host/piix.c
218e99
@@ -636,7 +636,6 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = i440fx_pcihost_initfn;
218e99
     dc->fw_name = "pci";
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo i440fx_pcihost_info = {
218e99
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
218e99
index eec538e..cdb401f 100644
218e99
--- a/hw/pci-host/prep.c
218e99
+++ b/hw/pci-host/prep.c
218e99
@@ -213,7 +213,6 @@ static void raven_pcihost_class_init(ObjectClass *klass, void *data)
218e99
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
218e99
     dc->realize = raven_pcihost_realizefn;
218e99
     dc->fw_name = "pci";
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo raven_pcihost_info = {
218e99
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
218e99
index 42b6367..0cc840e 100644
218e99
--- a/hw/ppc/spapr_vio.c
218e99
+++ b/hw/ppc/spapr_vio.c
218e99
@@ -529,11 +529,9 @@ static int spapr_vio_bridge_init(SysBusDevice *dev)
218e99
 
218e99
 static void spapr_vio_bridge_class_init(ObjectClass *klass, void *data)
218e99
 {
218e99
-    DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = spapr_vio_bridge_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo spapr_vio_bridge_info = {
218e99
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
218e99
index f86a4af..cc29d8e 100644
218e99
--- a/hw/s390x/ipl.c
218e99
+++ b/hw/s390x/ipl.c
218e99
@@ -181,7 +181,6 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
218e99
     k->init = s390_ipl_init;
218e99
     dc->props = s390_ipl_properties;
218e99
     dc->reset = s390_ipl_reset;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo s390_ipl_info = {
218e99
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
218e99
index 9078bfb..2fce4c5 100644
218e99
--- a/hw/s390x/s390-virtio-bus.c
218e99
+++ b/hw/s390x/s390-virtio-bus.c
218e99
@@ -675,11 +675,9 @@ static int s390_virtio_bridge_init(SysBusDevice *dev)
218e99
 
218e99
 static void s390_virtio_bridge_class_init(ObjectClass *klass, void *data)
218e99
 {
218e99
-    DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = s390_virtio_bridge_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo s390_virtio_bridge_info = {
218e99
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
218e99
index 74eb559..d981101 100644
218e99
--- a/hw/s390x/virtio-ccw.c
218e99
+++ b/hw/s390x/virtio-ccw.c
218e99
@@ -1071,11 +1071,9 @@ static int virtual_css_bridge_init(SysBusDevice *dev)
218e99
 
218e99
 static void virtual_css_bridge_class_init(ObjectClass *klass, void *data)
218e99
 {
218e99
-    DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = virtual_css_bridge_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo virtual_css_bridge_info = {
218e99
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
218e99
index 95e4587..c5ad890 100644
218e99
--- a/hw/sd/pl181.c
218e99
+++ b/hw/sd/pl181.c
218e99
@@ -497,7 +497,6 @@ static void pl181_class_init(ObjectClass *klass, void *data)
218e99
     sdc->init = pl181_init;
218e99
     k->vmsd = &vmstate_pl181;
218e99
     k->reset = pl181_reset;
218e99
-    k->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo pl181_info = {
218e99
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
218e99
index 6b088fa..aab4ae4 100644
218e99
--- a/hw/timer/arm_mptimer.c
218e99
+++ b/hw/timer/arm_mptimer.c
218e99
@@ -290,7 +290,6 @@ static void arm_mptimer_class_init(ObjectClass *klass, void *data)
218e99
     sbc->init = arm_mptimer_init;
218e99
     dc->vmsd = &vmstate_arm_mptimer;
218e99
     dc->reset = arm_mptimer_reset;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = arm_mptimer_properties;
218e99
 }
218e99
 
218e99
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
218e99
index 3f7f457..dd486a1 100644
218e99
--- a/hw/timer/hpet.c
218e99
+++ b/hw/timer/hpet.c
218e99
@@ -739,7 +739,6 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = hpet_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = hpet_reset;
218e99
     dc->vmsd = &vmstate_hpet;
218e99
     dc->props = hpet_device_properties;
218e99
diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c
218e99
index aa9c5a6..241e7c8 100644
218e99
--- a/hw/timer/pl031.c
218e99
+++ b/hw/timer/pl031.c
218e99
@@ -246,7 +246,6 @@ static void pl031_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl031_init;
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl031;
218e99
 }
218e99
 
218e99
-- 
218e99
1.7.1
218e99