spapr: handle cpu core unplug via hotplug handler chain
commita4261be17213eea96673fac71bc89f5342422b76
authorDavid Hildenbrand <david@redhat.com>
Fri, 8 Jun 2018 12:48:16 +0000 (8 14:48 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Jun 2018 00:44:36 +0000 (12 10:44 +1000)
treebbd880409667b5987df7b72e3e102588fa4da982
parent3ec71474cad1066865b3c2059add208794a418da
spapr: handle cpu core unplug via hotplug handler chain

Factor out cpu core unplug into separate function from
spapr_core_release(). Then use generic hotplug_handler_unplug() to trigger
cpu core unplug, which would call spapr_machine_device_unplug() ->
spapr_core_unplug() in the end.

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

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