aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc_prep.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-03-27 18:38:46 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-04-02 15:04:15 -0500
commitf424d5c4c9de67b56594384eac3c08dc33de9344 (patch)
tree0559a455e18c7b0cd342c33e11474702685dca1e /hw/ppc_prep.c
parenta612b2a6635fa1a3a29a8bcf41b31f1f3fae1110 (diff)
downloadqemu-f424d5c4c9de67b56594384eac3c08dc33de9344.zip
qemu-f424d5c4c9de67b56594384eac3c08dc33de9344.tar.gz
qemu-f424d5c4c9de67b56594384eac3c08dc33de9344.tar.bz2
qdev: add children before qdev_init
We want the composition tree to to be in order by the time we call qdev_init, so that a single set of the toplevel realize property can propagate all the way down the composition tree. This is not the case so far. Unfortunately, this is incompatible with calling qdev_init in the constructor wrappers for devices, so for now we need to unattach some devices that are created through those wrappers. This will be fixed by removing qdev_init and instead setting the toplevel realize property after machine init. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ppc_prep.c')
-rw-r--r--hw/ppc_prep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 06d589d..86c9336 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -615,8 +615,8 @@ static void ppc_prep_init (ram_addr_t ram_size,
sys = sysbus_from_qdev(dev);
pcihost = DO_UPCAST(PCIHostState, busdev, sys);
pcihost->address_space = get_system_memory();
- qdev_init_nofail(dev);
object_property_add_child(object_get_root(), "raven", OBJECT(dev), NULL);
+ qdev_init_nofail(dev);
pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
if (pci_bus == NULL) {
fprintf(stderr, "Couldn't create PCI host controller.\n");