spapr_numa.c: rename numa_assoc_array to FORM1_assoc_array
commita165ac67c3ff8dc7065aa827de36da3785ec83fd
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 20 Sep 2021 17:49:44 +0000 (20 14:49 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 30 Sep 2021 02:26:06 +0000 (30 12:26 +1000)
tree420498b3bd05717de08a7c40441f3ebce0ebb680
parent3a6e4ce684e48988f9736aecc6b365609e83f8d1
spapr_numa.c: rename numa_assoc_array to FORM1_assoc_array

Introducing a new NUMA affinity, FORM2, requires a new mechanism to
switch between affinity modes after CAS. Also, we want FORM2 data
structures and functions to be completely separated from the existing
FORM1 code, allowing us to avoid adding new code that inherits the
existing complexity of FORM1.

The idea of switching values used by the write_dt() functions in
spapr_numa.c was already introduced in the previous patch, and
the same approach will be used when dealing with the FORM1 and FORM2
arrays.

We can accomplish that by that by renaming the existing numa_assoc_array
to FORM1_assoc_array, which now is used exclusively to handle FORM1 affinity
data. A new helper get_associativity() is then introduced to be used by the
write_dt() functions to retrieve the current ibm,associativity array of
a given node, after considering affinity selection that might have been
done during CAS. All code that was using numa_assoc_array now needs to
retrieve the array by calling this function.

This will allow for an easier plug of FORM2 data later on.

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