spapr: handle pc-dimm unplug via hotplug handler chain
commit3ec71474cad1066865b3c2059add208794a418da
authorDavid Hildenbrand <david@redhat.com>
Fri, 8 Jun 2018 12:48:15 +0000 (8 14:48 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Jun 2018 00:44:36 +0000 (12 10:44 +1000)
treee787a83ea5abddf52727e6b931710c67f1f72a2c
parent88432f44aae752028103408f2f6df8c681143907
spapr: handle pc-dimm unplug via hotplug handler chain

Factor out memory unplug into separate function from spapr_lmb_release().
Then use generic hotplug_handler_unplug() to trigger memory unplug,
which will call spapr_machine_device_unplug() -> spapr_memory_unplug()
in the end.

This way unplug operation is not buried in lmb internals and located in
the same place like in other targets, following similar logic/call chain
across targets.

Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c