spapr: Remove unhelpful helpers from rtas_start_cpu()
commit982489180b72a41f008bbcf761ba1ed3f5f916ba
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 1 May 2018 06:05:09 +0000 (1 16:05 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 May 2018 05:00:37 +0000 (4 15:00 +1000)
tree603b3673ca9f5b1eb8d4677d99c99bb36bc361bf
parentcf116ad4703a37b66122d97f139afb2321b9c40e
spapr: Remove unhelpful helpers from rtas_start_cpu()

rtas_start_cpu() calls spapr_cpu_update_tb_offset() and
spapr_cpu_set_endianness() to initialize certain things in the new cpu's
state.  This is the only caller of those helpers, and they're each only
a few lines long, so we might as well just fold them into the caller.

In addition, those helpers initialize state on the new cpu to match that of
the first cpu.  That will generally work, but might be at least logically
incorrect if the first cpu has been set offline by the guest.  So, instead
base the state on that of the cpu invoking the RTAS call, which is
obviously active already.

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