From bb2bdd812ee9a9a38007b95c3967c528e552912c Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Tue, 19 Feb 2019 18:18:49 +0100 Subject: spapr: add hotplug hooks for PHB hotplug Hotplugging PHBs is a machine-level operation, but PHBs reside on the main system bus, so we register spapr machine as the handler for the main system bus. Provide the usual pre-plug, plug and unplug-request handlers. Move the checking of the PHB index to the pre-plug handler. It is okay to do that and assert in the realize function because the pre-plug handler is always called, even for the oldest machine types we support. Signed-off-by: Michael Roth (Fixed interrupt controller phandle in "interrupt-map" and TCE table size in "ibm,dma-window" FDT fragment, Greg Kurz) Signed-off-by: Greg Kurz Message-Id: <155059672926.1466090.13612804072190051439.stgit@bahia.lab.toulouse-stg.fr.ibm.com> Signed-off-by: David Gibson --- hw/ppc/spapr_drc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/ppc/spapr_drc.c') diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index fd6380adb3..2943cf47d4 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -703,6 +703,8 @@ static void spapr_drc_phb_class_init(ObjectClass *k, void *data) drck->typeshift = SPAPR_DR_CONNECTOR_TYPE_SHIFT_PHB; drck->typename = "PHB"; drck->drc_name_prefix = "PHB "; + drck->release = spapr_phb_release; + drck->dt_populate = spapr_phb_dt_populate; } static const TypeInfo spapr_dr_connector_info = { -- cgit v1.2.3