diff options
author | Greg Kurz <groug@kaod.org> | 2019-02-19 18:17:58 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-02-26 09:21:25 +1100 |
commit | 09d876ce2c8ea3efd34e02d898c3122e04b814bc (patch) | |
tree | a5ac5565a2e7e9c7a7c5a67c0a6bd22b71e33002 /hw/ppc | |
parent | 46fd02990df10be2833c1c67b244aa87f0b61d6d (diff) | |
download | qemu-09d876ce2c8ea3efd34e02d898c3122e04b814bc.zip qemu-09d876ce2c8ea3efd34e02d898c3122e04b814bc.tar.gz qemu-09d876ce2c8ea3efd34e02d898c3122e04b814bc.tar.bz2 |
spapr/drc: Drop spapr_drc_attach() fdt argument
All DRC subtypes have been converted to generate the FDT fragment at
configure connector time instead of attach time. The fdt and fdt_offset
arguments of spapr_drc_attach() aren't needed anymore. Drop them and
make the implementation of the dt_populate() method mandatory.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155059667853.1466090.16527852453054217565.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr.c | 4 | ||||
-rw-r--r-- | hw/ppc/spapr_drc.c | 13 | ||||
-rw-r--r-- | hw/ppc/spapr_pci.c | 2 |
3 files changed, 4 insertions, 15 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6cf7a9f..9364d07 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3362,7 +3362,7 @@ static void spapr_add_lmbs(DeviceState *dev, uint64_t addr_start, uint64_t size, addr / SPAPR_MEMORY_BLOCK_SIZE); g_assert(drc); - spapr_drc_attach(drc, dev, NULL, 0, &local_err); + spapr_drc_attach(drc, dev, &local_err); if (local_err) { while (addr > addr_start) { addr -= SPAPR_MEMORY_BLOCK_SIZE; @@ -3744,7 +3744,7 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev, g_assert(drc || !mc->has_hotpluggable_cpus); if (drc) { - spapr_drc_attach(drc, dev, NULL, 0, &local_err); + spapr_drc_attach(drc, dev, &local_err); if (local_err) { error_propagate(errp, local_err); return; diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 248eb8a..87ca7d9 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -374,11 +374,8 @@ static void prop_get_fdt(Object *obj, Visitor *v, const char *name, } while (fdt_depth != 0); } -void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt, - int fdt_start_offset, Error **errp) +void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, Error **errp) { - sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); - trace_spapr_drc_attach(spapr_drc_index(drc)); if (drc->dev) { @@ -387,15 +384,9 @@ void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt, } g_assert((drc->state == SPAPR_DRC_STATE_LOGICAL_UNUSABLE) || (drc->state == SPAPR_DRC_STATE_PHYSICAL_POWERON)); - g_assert(fdt || drck->dt_populate); drc->dev = d; - if (fdt) { - drc->fdt = fdt; - drc->fdt_start_offset = fdt_start_offset; - } - object_property_add_link(OBJECT(drc), "device", object_get_typename(OBJECT(drc->dev)), (Object **)(&drc->dev), @@ -1113,8 +1104,6 @@ static void rtas_ibm_configure_connector(PowerPCCPU *cpu, drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); - g_assert(drc->fdt || drck->dt_populate); - if (!drc->fdt) { Error *local_err = NULL; void *fdt; diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index b22c9f5..e2bc9fe 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1457,7 +1457,7 @@ static void spapr_pci_plug(HotplugHandler *plug_handler, goto out; } - spapr_drc_attach(drc, DEVICE(pdev), NULL, 0, &local_err); + spapr_drc_attach(drc, DEVICE(pdev), &local_err); if (local_err) { goto out; } |