spapr: Clean up rtas_start_cpu() & rtas_stop_self()
commitcf116ad4703a37b66122d97f139afb2321b9c40e
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 1 May 2018 05:43:58 +0000 (1 15:43 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 May 2018 05:00:37 +0000 (4 15:00 +1000)
tree863cee740258bf5fd4d2bd41b99ebd9161249fd5
parent5ad553154d1137fbee9ec92b991e52123fa9bcd8
spapr: Clean up rtas_start_cpu() & rtas_stop_self()

This makes several minor cleanups to these functions:
  * Follow usual convention of an early exit on error, rather than having
    most of the body in an if
  * Clearer naming of cpu and cpu_.  Now callcpu is the cpu from which the
    RTAS call is invoked, newcpu is the cpu which we're starting
  * Use cpu_synchronize_state() instead of kvm_cpu_synchronize_state()
    directly
  * Remove pointless comment describing what cpu_synchronize_state() does
  * Use ppc_store_lpcr() instead of directly writing the register field

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
hw/ppc/spapr_rtas.c