mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
ppc/pnv: Link "chip" property to PnvXive::chip pointer
The XIVE 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: <157383336564.165747.10250365296928442882.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
158e17a65e
commit
7ae54cc3a0
2 changed files with 5 additions and 12 deletions
|
@ -1091,8 +1091,6 @@ static void pnv_chip_power9_instance_init(Object *obj)
|
|||
|
||||
object_initialize_child(obj, "xive", &chip9->xive, sizeof(chip9->xive),
|
||||
TYPE_PNV_XIVE, &error_abort, NULL);
|
||||
object_property_add_const_link(OBJECT(&chip9->xive), "chip", obj,
|
||||
&error_abort);
|
||||
|
||||
object_initialize_child(obj, "psi", &chip9->psi, sizeof(chip9->psi),
|
||||
TYPE_PNV9_PSI, &error_abort, NULL);
|
||||
|
@ -1172,6 +1170,8 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
|
|||
"pc-bar", &error_fatal);
|
||||
object_property_set_int(OBJECT(&chip9->xive), PNV9_XIVE_TM_BASE(chip),
|
||||
"tm-bar", &error_fatal);
|
||||
object_property_set_link(OBJECT(&chip9->xive), OBJECT(chip), "chip",
|
||||
&error_abort);
|
||||
object_property_set_bool(OBJECT(&chip9->xive), true, "realized",
|
||||
&local_err);
|
||||
if (local_err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue