ppc/pnv: Instantiate cores separately
commit4fa28f23906dc268c4c3be3236f15a4de1093c18
authorGreg Kurz <groug@kaod.org>
Mon, 25 Nov 2019 06:58:03 +0000 (25 07:58 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 16 Dec 2019 23:39:47 +0000 (17 10:39 +1100)
tree9090982bfb2e22b36ad5539914a6f9329b0b13cc
parentf87dae18d8675f8fef7b34e713d3951fb594d5be
ppc/pnv: Instantiate cores separately

Allocating a big void * array to store multiple objects isn't a
recommended practice for various reasons:
 - no compile time type checking
 - potential dangling pointers if a reference on an individual is
  taken and the array is freed later on
 - duplicate boiler plate everywhere the array is browsed through

Allocate an array of pointers and populate it instead.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20191125065820.927-4-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/pnv.c
include/hw/ppc/pnv.h