diff options
author | Greg Kurz <groug@kaod.org> | 2017-06-08 15:42:41 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-06-09 12:12:34 +1000 |
commit | ad265631c0a0addc06ec3c4f133e746f4dcc872a (patch) | |
tree | 9fdf4cf7b3005fa6311613c536d2a1a5a70dca80 /hw | |
parent | 3b954105074b6e8ba38b609007a4c0a2f76e4d71 (diff) |
xics: introduce macros for ICP/ICS link properties
These properties are part of the XICS API. They deserve to appear
explicitely in the XICS header file.
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/intc/xics.c | 8 | ||||
-rw-r--r-- | hw/ppc/pnv_core.c | 3 | ||||
-rw-r--r-- | hw/ppc/pnv_psi.c | 3 | ||||
-rw-r--r-- | hw/ppc/spapr.c | 3 | ||||
-rw-r--r-- | hw/ppc/spapr_cpu_core.c | 3 |
5 files changed, 12 insertions, 8 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c index ec73f02144..aa2c4e744f 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -346,9 +346,9 @@ static void icp_realize(DeviceState *dev, Error **errp) Object *obj; Error *err = NULL; - obj = object_property_get_link(OBJECT(dev), "xics", &err); + obj = object_property_get_link(OBJECT(dev), ICP_PROP_XICS, &err); if (!obj) { - error_setg(errp, "%s: required link 'xics' not found: %s", + error_setg(errp, "%s: required link '" ICP_PROP_XICS "' not found: %s", __func__, error_get_pretty(err)); return; } @@ -654,9 +654,9 @@ static void ics_base_realize(DeviceState *dev, Error **errp) Object *obj; Error *err = NULL; - obj = object_property_get_link(OBJECT(dev), "xics", &err); + obj = object_property_get_link(OBJECT(dev), ICS_PROP_XICS, &err); if (!obj) { - error_setg(errp, "%s: required link 'xics' not found: %s", + error_setg(errp, "%s: required link '" ICS_PROP_XICS "' not found: %s", __func__, error_get_pretty(err)); return; } diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index e8a9a94d5a..0b6e72950c 100644 --- a/hw/ppc/pnv_core.c +++ b/hw/ppc/pnv_core.c @@ -121,7 +121,8 @@ static void pnv_core_realize_child(Object *child, XICSFabric *xi, Error **errp) obj = object_new(TYPE_PNV_ICP); object_property_add_child(OBJECT(cpu), "icp", obj, &error_abort); object_unref(obj); - object_property_add_const_link(obj, "xics", OBJECT(xi), &error_abort); + object_property_add_const_link(obj, ICP_PROP_XICS, OBJECT(xi), + &error_abort); object_property_set_bool(obj, true, "realized", &local_err); if (local_err) { error_propagate(errp, local_err); diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 2bf5bfe3fd..9876c26622 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -474,7 +474,8 @@ static void pnv_psi_realize(DeviceState *dev, Error **errp) } /* Create PSI interrupt control source */ - object_property_add_const_link(OBJECT(ics), "xics", obj, &error_abort); + object_property_add_const_link(OBJECT(ics), ICS_PROP_XICS, obj, + &error_abort); object_property_set_int(OBJECT(ics), PSI_NUM_INTERRUPTS, "nr-irqs", &err); if (err) { error_propagate(errp, err); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 01dda9ea9f..b2951d7618 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -107,7 +107,8 @@ static ICSState *spapr_ics_create(sPAPRMachineState *spapr, obj = object_new(type_ics); object_property_add_child(OBJECT(spapr), "ics", obj, &error_abort); - object_property_add_const_link(obj, "xics", OBJECT(spapr), &error_abort); + object_property_add_const_link(obj, ICS_PROP_XICS, OBJECT(spapr), + &error_abort); object_property_set_int(obj, nr_irqs, "nr-irqs", &local_err); if (local_err) { goto error; diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 029a14120e..e81879c7ca 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -145,7 +145,8 @@ static void spapr_cpu_core_realize_child(Object *child, Error **errp) obj = object_new(spapr->icp_type); object_property_add_child(OBJECT(cpu), "icp", obj, &error_abort); object_unref(obj); - object_property_add_const_link(obj, "xics", OBJECT(spapr), &error_abort); + object_property_add_const_link(obj, ICP_PROP_XICS, OBJECT(spapr), + &error_abort); object_property_set_bool(obj, true, "realized", &local_err); if (local_err) { goto error; |