pseries: Clean up error handling of spapr_cpu_init()
commit569f49671dde92bb2bf55d4d2f32537e04c3c7c8
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 20 Jan 2016 01:58:21 +0000 (20 12:58 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 30 Jan 2016 12:37:37 +0000 (30 23:37 +1100)
tree883e70c4577d2a4061a25b5f5e36b7fc0450fe93
parentf9ab1e87edae8a72ae2a65fad658a77ad15d4da0
pseries: Clean up error handling of spapr_cpu_init()

Currently spapr_cpu_init() is hardcoded to handle any errors as fatal.
That works for now, since it's only called from initial setup where an
error here means we really can't proceed.

However, we'll want to handle this more flexibly for cpu hotplug in future
so generalize this using the error reporting infrastructure.  While we're
at it make a small cleanup in a related part of ppc_spapr_init() to use
error_report() instead of an old-style explicit fprintf().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
hw/ppc/spapr.c