spapr: Move handling of special NVLink numa node from reset to init
commitdb5127b28ae1113bbc10f843d1cd219dc90a52d1
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 6 Sep 2019 04:48:28 +0000 (6 14:48 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Oct 2019 00:25:23 +0000 (4 10:25 +1000)
tree11a0c92ed4f6c0f10ce2eba33a35fece82611629
parentdaa36379ce1a0a683562d40ca20f9b722ef595e1
spapr: Move handling of special NVLink numa node from reset to init

The number of NUMA nodes in the system is fixed from the command line.
Therefore, there's no need to recalculate it at reset time, and we can
determine the special gpu_numa_id value used for NVLink2 devices at init
time.

This simplifies the reset path a bit which will make further improvements
easier.

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