diff options
author | David Gibson | 2018-03-23 03:31:52 +0100 |
---|---|---|
committer | David Gibson | 2018-04-27 10:05:22 +0200 |
commit | b07c59f7c8df6efc24576f07622b61ad115468e6 (patch) | |
tree | 5cbf088fe35640a1481d068f9422a0da61df4e14 /hw/ppc/fdt.c | |
parent | target/ppc: Move page size setup to helper function (diff) | |
download | qemu-b07c59f7c8df6efc24576f07622b61ad115468e6.tar.gz qemu-b07c59f7c8df6efc24576f07622b61ad115468e6.tar.xz qemu-b07c59f7c8df6efc24576f07622b61ad115468e6.zip |
target/ppc: Split page size information into a separate allocation
env->sps contains page size encoding information as an embedded structure.
Since this information is specific to 64-bit hash MMUs, split it out into
a separately allocated structure, to reduce the basic env size for other
cpus. Along the way we make a few other cleanups:
* Rename to PPCHash64Options which is more in line with qemu name
conventions, and reflects that we're going to merge some more hash64
mmu specific details in there in future. Also rename its
substructures to match qemu conventions.
* Move structure definitions to the mmu-hash64.[ch] files.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/ppc/fdt.c')
-rw-r--r-- | hw/ppc/fdt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/fdt.c b/hw/ppc/fdt.c index 2721603ffa..0828ad7254 100644 --- a/hw/ppc/fdt.c +++ b/hw/ppc/fdt.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "target/ppc/cpu.h" +#include "target/ppc/mmu-hash64.h" #include "hw/ppc/fdt.h" @@ -16,13 +17,12 @@ size_t ppc_create_page_sizes_prop(PowerPCCPU *cpu, uint32_t *prop, size_t maxsize) { - CPUPPCState *env = &cpu->env; size_t maxcells = maxsize / sizeof(uint32_t); int i, j, count; uint32_t *p = prop; for (i = 0; i < PPC_PAGE_SIZES_MAX_SZ; i++) { - struct ppc_one_seg_page_size *sps = &env->sps.sps[i]; + PPCHash64SegmentPageSizes *sps = &cpu->hash64_opts->sps[i]; if (!sps->page_shift) { break; |