target/ppc: Pass cpu instead of env to ppc_create_page_sizes_prop()
As a rule we prefer to pass PowerPCCPU instead of CPUPPCState, and this change will make some things simpler later on. 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>
This commit is contained in:
parent
197600ecc4
commit
644a2c99a9
@ -13,9 +13,10 @@
|
||||
#include "hw/ppc/fdt.h"
|
||||
|
||||
#if defined(TARGET_PPC64)
|
||||
size_t ppc_create_page_sizes_prop(CPUPPCState *env, uint32_t *prop,
|
||||
size_t maxsize)
|
||||
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;
|
||||
|
@ -209,8 +209,8 @@ static void pnv_dt_core(PnvChip *chip, PnvCore *pc, void *fdt)
|
||||
_FDT((fdt_setprop_cell(fdt, offset, "ibm,dfp", 1)));
|
||||
}
|
||||
|
||||
page_sizes_prop_size = ppc_create_page_sizes_prop(env, page_sizes_prop,
|
||||
sizeof(page_sizes_prop));
|
||||
page_sizes_prop_size = ppc_create_page_sizes_prop(cpu, page_sizes_prop,
|
||||
sizeof(page_sizes_prop));
|
||||
if (page_sizes_prop_size) {
|
||||
_FDT((fdt_setprop(fdt, offset, "ibm,segment-page-sizes",
|
||||
page_sizes_prop, page_sizes_prop_size)));
|
||||
|
@ -581,8 +581,8 @@ static void spapr_populate_cpu_dt(CPUState *cs, void *fdt, int offset,
|
||||
_FDT((fdt_setprop_cell(fdt, offset, "ibm,dfp", 1)));
|
||||
}
|
||||
|
||||
page_sizes_prop_size = ppc_create_page_sizes_prop(env, page_sizes_prop,
|
||||
sizeof(page_sizes_prop));
|
||||
page_sizes_prop_size = ppc_create_page_sizes_prop(cpu, page_sizes_prop,
|
||||
sizeof(page_sizes_prop));
|
||||
if (page_sizes_prop_size) {
|
||||
_FDT((fdt_setprop(fdt, offset, "ibm,segment-page-sizes",
|
||||
page_sizes_prop, page_sizes_prop_size)));
|
||||
|
@ -23,7 +23,7 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
size_t ppc_create_page_sizes_prop(CPUPPCState *env, uint32_t *prop,
|
||||
size_t ppc_create_page_sizes_prop(PowerPCCPU *cpu, uint32_t *prop,
|
||||
size_t maxsize);
|
||||
|
||||
#endif /* PPC_FDT_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user