summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc/pnv_core.h
diff options
context:
space:
mode:
authorDavid Gibson2018-06-13 03:57:37 +0200
committerDavid Gibson2018-06-16 08:32:33 +0200
commit08304a8689ef726fe1e3f61645a870fb53f67895 (patch)
tree9819fdf727d9025fe179fecc7b05388268e25c08 /include/hw/ppc/pnv_core.h
parentpnv: Fix some error handling cpu realize() (diff)
downloadqemu-08304a8689ef726fe1e3f61645a870fb53f67895.tar.gz
qemu-08304a8689ef726fe1e3f61645a870fb53f67895.tar.xz
qemu-08304a8689ef726fe1e3f61645a870fb53f67895.zip
pnv_core: Allocate cpu thread objects individually
Currently, we allocate space for all the cpu objects within a single core in one big block. This was copied from an older version of the spapr code and requires some ugly pointer manipulation to extract the individual objects. This design was due to a misunderstanding of qemu lifetime conventions and has already been changed in spapr (in 94ad93bd "spapr_cpu_core: instantiate CPUs separately". Make an equivalent change in pnv_core to get rid of the nasty pointer arithmetic. 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>
Diffstat (limited to 'include/hw/ppc/pnv_core.h')
-rw-r--r--include/hw/ppc/pnv_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/ppc/pnv_core.h b/include/hw/ppc/pnv_core.h
index e337af7a3a..447ae761f7 100644
--- a/include/hw/ppc/pnv_core.h
+++ b/include/hw/ppc/pnv_core.h
@@ -34,7 +34,7 @@ typedef struct PnvCore {
CPUCore parent_obj;
/*< public >*/
- void *threads;
+ PowerPCCPU **threads;
uint32_t pir;
MemoryRegion xscom_regs;