diff options
author | Greg Kurz | 2019-11-15 16:55:54 +0100 |
---|---|---|
committer | David Gibson | 2019-12-17 00:39:47 +0100 |
commit | f2582acf993f2f62bba5c8d74726a199abe3a491 (patch) | |
tree | 684e91af88bfd49724e793ab9fab48a93e490fb6 /hw/ppc/pnv.c | |
parent | ppc/pnv: Link "psi" property to PnvOCC::psi pointer (diff) | |
download | qemu-f2582acf993f2f62bba5c8d74726a199abe3a491.tar.gz qemu-f2582acf993f2f62bba5c8d74726a199abe3a491.tar.xz qemu-f2582acf993f2f62bba5c8d74726a199abe3a491.zip |
ppc/pnv: Link "chip" property to PnvHomer::chip pointer
The homer object has both a pointer and a "chip" property pointing to the
chip object. Confusing bugs could arise if these ever go out of sync.
Change the property definition so that it explicitely sets the pointer.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <157383335451.165747.32301068645427993.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/pnv.c')
-rw-r--r-- | hw/ppc/pnv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index ce24a4ee99..3fa24a2d60 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -907,8 +907,6 @@ static void pnv_chip_power8_instance_init(Object *obj) object_initialize_child(obj, "homer", &chip8->homer, sizeof(chip8->homer), TYPE_PNV8_HOMER, &error_abort, NULL); - object_property_add_const_link(OBJECT(&chip8->homer), "chip", obj, - &error_abort); } static void pnv_chip_icp_realize(Pnv8Chip *chip8, Error **errp) @@ -1012,6 +1010,8 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp) &chip8->occ.sram_regs); /* HOMER */ + object_property_set_link(OBJECT(&chip8->homer), OBJECT(chip), "chip", + &error_abort); object_property_set_bool(OBJECT(&chip8->homer), true, "realized", &local_err); if (local_err) { @@ -1105,8 +1105,6 @@ static void pnv_chip_power9_instance_init(Object *obj) object_initialize_child(obj, "homer", &chip9->homer, sizeof(chip9->homer), TYPE_PNV9_HOMER, &error_abort, NULL); - object_property_add_const_link(OBJECT(&chip9->homer), "chip", obj, - &error_abort); } static void pnv_chip_quad_realize(Pnv9Chip *chip9, Error **errp) @@ -1223,6 +1221,8 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp) &chip9->occ.sram_regs); /* HOMER */ + object_property_set_link(OBJECT(&chip9->homer), OBJECT(chip), "chip", + &error_abort); object_property_set_bool(OBJECT(&chip9->homer), true, "realized", &local_err); if (local_err) { |