diff options
author | David Hildenbrand <david@redhat.com> | 2018-04-23 18:51:19 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-05-07 10:00:02 -0300 |
commit | bd6c3e4a4975ee1e5cadbc1826af9bd0ca0954c2 (patch) | |
tree | 4eb408b4c4f9303ec23b14b9aff2059581beb9dc /hw/ppc | |
parent | acc7fa17e6fe96bd68ad9af04fde5091383ef25e (diff) |
pc-dimm: pass in the machine and to the MemoryHotplugState
We use the machine internally either way, so let's just pass it in then.
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180423165126.15441-5-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d4917e89c6..4576ad63bc 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3153,7 +3153,7 @@ static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev, align = memory_region_get_alignment(mr); size = memory_region_size(mr); - pc_dimm_memory_plug(dev, MACHINE(ms)->device_memory, align, &local_err); + pc_dimm_memory_plug(dev, MACHINE(ms), align, &local_err); if (local_err) { goto out; } @@ -3174,7 +3174,7 @@ static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; out_unplug: - pc_dimm_memory_unplug(dev, MACHINE(ms)->device_memory); + pc_dimm_memory_unplug(dev, MACHINE(ms)); out: error_propagate(errp, local_err); } @@ -3311,7 +3311,7 @@ void spapr_lmb_release(DeviceState *dev) * Now that all the LMBs have been removed by the guest, call the * pc-dimm unplug handler to cleanup up the pc-dimm device. */ - pc_dimm_memory_unplug(dev, MACHINE(spapr)->device_memory); + pc_dimm_memory_unplug(dev, MACHINE(spapr)); object_unparent(OBJECT(dev)); spapr_pending_dimm_unplugs_remove(spapr, ds); } |