From: Cédric Le Goater Date: Mon, 27 Feb 2017 14:29:27 +0000 (+0100) Subject: ppc/xics: register the reset handler of ICP objects X-Git-Tag: v2.9.0-rc0~43^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20147f2fceaa8a89176e49e1941f741d12a3364c;p=thirdparty%2Fqemu.git ppc/xics: register the reset handler of ICP objects The reset of the ICP objects is currently handled by XICS but this can be done for each individual ICP. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- diff --git a/hw/intc/xics.c b/hw/intc/xics.c index ddb0a6f48b5..51e6c0c85fc 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -137,29 +137,11 @@ static void ics_simple_pic_print_info(InterruptStatsProvider *obj, /* * XICS Common class - parent for emulated XICS and KVM-XICS */ -static void xics_common_reset(DeviceState *d) -{ - XICSState *xics = XICS_COMMON(d); - int i; - - for (i = 0; i < xics->nr_servers; i++) { - device_reset(DEVICE(&xics->ss[i])); - } -} - -static void xics_common_class_init(ObjectClass *oc, void *data) -{ - DeviceClass *dc = DEVICE_CLASS(oc); - - dc->reset = xics_common_reset; -} - static const TypeInfo xics_common_info = { .name = TYPE_XICS_COMMON, .parent = TYPE_DEVICE, .instance_size = sizeof(XICSState), .class_size = sizeof(XICSStateClass), - .class_init = xics_common_class_init, }; /* diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7ad932fb28b..8b2d21c15b6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -131,6 +131,7 @@ static XICSState *try_create_xics(sPAPRMachineState *spapr, ICPState *icp = &xics->ss[i]; object_initialize(icp, sizeof(*icp), type_icp); + qdev_set_parent_bus(DEVICE(icp), sysbus_get_default()); object_property_add_child(OBJECT(xics), "icp[*]", OBJECT(icp), NULL); object_property_add_const_link(OBJECT(icp), "xics", OBJECT(xi), NULL); object_property_set_bool(OBJECT(icp), true, "realized", &err);