OSDN Git Service

pseries: Consolidate construction of /rtas device tree node
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 20 Oct 2016 04:55:36 +0000 (15:55 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 27 Oct 2016 22:38:26 +0000 (09:38 +1100)
commit3f5dabceba246e502555a9046b98174d7548e696
tree37553f1dfe357ddaa705005e39fd8a4643803053
parent7c866c6a600e435cf92f764b831d9cb3234ca0b4
pseries: Consolidate construction of /rtas device tree node

For historical reasons construction of the /rtas node in the device
tree (amongst others) is split into several places.  In particular
it's split between spapr_create_fdt_skel(), spapr_build_fdt() and
spapr_rtas_device_tree_setup().

In fact, as well as adding the actual RTAS tokens to the device tree,
spapr_rtas_device_tree_setup() just adds the ibm,lrdr-capacity
property, which despite going in the /rtas node, doesn't have a lot to
do with RTAS.

This patch consolidates the code constructing /rtas together into a new
spapr_dt_rtas() function.  spapr_rtas_device_tree_setup() is renamed to
spapr_dt_rtas_tokens() and now only adds the token properties.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr.c
hw/ppc/spapr_rtas.c
include/hw/ppc/spapr.h