From: Cédric Le Goater Date: Mon, 27 Feb 2017 14:29:19 +0000 (+0100) Subject: ppc/xics: register the reset handler of ICS objects X-Git-Tag: v2.9.0-rc0~43^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c79b2fdd7bfc51de5f93c7008f7ed6a262389ed6;p=thirdparty%2Fqemu.git ppc/xics: register the reset handler of ICS objects The reset of the ICS objects is currently handled by XICS but this can be done for each individual ICS. This also reduces the use of the XICS list of ICS. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Signed-off-by: David Gibson --- diff --git a/hw/intc/xics.c b/hw/intc/xics.c index a71d3858b13..97775c2b61e 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -139,16 +139,11 @@ static void ics_simple_pic_print_info(InterruptStatsProvider *obj, static void xics_common_reset(DeviceState *d) { XICSState *xics = XICS_COMMON(d); - ICSState *ics; int i; for (i = 0; i < xics->nr_servers; i++) { device_reset(DEVICE(&xics->ss[i])); } - - QLIST_FOREACH(ics, &xics->ics, list) { - device_reset(DEVICE(ics)); - } } static void xics_common_initfn(Object *obj) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a4e4b86d377..a5e6072a805 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -114,6 +114,7 @@ static XICSState *try_create_xics(sPAPRMachineState *spapr, } ics = ICS_SIMPLE(object_new(type_ics)); + qdev_set_parent_bus(DEVICE(ics), sysbus_get_default()); object_property_add_child(OBJECT(spapr), "ics", OBJECT(ics), NULL); object_property_set_int(OBJECT(ics), nr_irqs, "nr-irqs", &err); object_property_add_const_link(OBJECT(ics), "xics", OBJECT(xics), NULL);