spapr: introduce SpaprMachineState::numa_assoc_array
commitf1aa45fffeeb084a9ad8bd08e83c5ec6af223884
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Thu, 3 Sep 2020 22:06:33 +0000 (3 19:06 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 8 Sep 2020 00:08:43 +0000 (8 10:08 +1000)
treec53740367f0a93f67ee6b28090c24cb68c6d2a87
parent6ee1d62e6af84c5ccda06763f2e58fb3f41ba106
spapr: introduce SpaprMachineState::numa_assoc_array

The next step to centralize all NUMA/associativity handling in
the spapr machine is to create a 'one stop place' for all
things ibm,associativity.

This patch introduces numa_assoc_array, a 2 dimensional array
that will store all ibm,associativity arrays of all NUMA nodes.
This array is initialized in a new spapr_numa_associativity_init()
function, called in spapr_machine_init(). It is being initialized
with the same values used in other ibm,associativity properties
around spapr files (i.e. all zeros, last value is node_id).
The idea is to remove all hardcoded definitions and FDT writes
of ibm,associativity arrays, doing instead a call to the new
helper spapr_numa_write_associativity_dt() helper, that will
be able to write the DT with the correct values.

We'll start small, handling the trivial cases first. The
remaining instances of ibm,associativity will be handled
next.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20200903220639.563090-2-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_numa.c
hw/ppc/spapr_nvdimm.c
hw/ppc/spapr_pci.c
include/hw/ppc/spapr.h
include/hw/ppc/spapr_numa.h
include/hw/ppc/spapr_nvdimm.h