diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-06-19 13:16:21 +0800 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-07-11 11:04:01 +1000 |
commit | 5c1da81215c7f4f010fbc0c146945a6f182e5586 (patch) | |
tree | 8b49f1e5ae55f4ac32b3b20f297a18efbaff3730 /hw/ppc/spapr.c | |
parent | 6b762f29a8bc9feb3e45d512169571d3cc8a4f48 (diff) | |
download | qemu-5c1da81215c7f4f010fbc0c146945a6f182e5586.zip qemu-5c1da81215c7f4f010fbc0c146945a6f182e5586.tar.gz qemu-5c1da81215c7f4f010fbc0c146945a6f182e5586.tar.bz2 |
spapr: Remove unnecessary differences between hotplug and coldplug paths
spapr_drc_attach() has a 'coldplug' parameter which sets the DRC into
configured state initially, instead of the usual ISOLATED/UNUSABLE state.
It turns out this is unnecessary: although coldplugged devices do need to
be in CONFIGURED state once the guest starts, that will already be
accomplished by the reset code which will move DRCs for already plugged
devices into a coldplug equivalent state.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 4fa982d..70b3fd3 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2611,7 +2611,7 @@ static void spapr_add_lmbs(DeviceState *dev, uint64_t addr_start, uint64_t size, fdt_offset = spapr_populate_memory_node(fdt, node, addr, SPAPR_MEMORY_BLOCK_SIZE); - spapr_drc_attach(drc, dev, fdt, fdt_offset, !dev->hotplugged, errp); + spapr_drc_attach(drc, dev, fdt, fdt_offset, errp); addr += SPAPR_MEMORY_BLOCK_SIZE; } /* send hotplug notification to the @@ -2956,17 +2956,10 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev, g_assert(drc || !mc->has_hotpluggable_cpus); - /* - * Setup CPU DT entries only for hotplugged CPUs. For boot time or - * coldplugged CPUs DT entries are setup in spapr_build_fdt(). - */ - if (dev->hotplugged) { - fdt = spapr_populate_hotplug_cpu_dt(cs, &fdt_offset, spapr); - } + fdt = spapr_populate_hotplug_cpu_dt(cs, &fdt_offset, spapr); if (drc) { - spapr_drc_attach(drc, dev, fdt, fdt_offset, !dev->hotplugged, - &local_err); + spapr_drc_attach(drc, dev, fdt, fdt_offset, &local_err); if (local_err) { g_free(fdt); error_propagate(errp, local_err); |