From de73ee1abe95d37fa1b9c3129cb8a778eea43159 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 4 Sep 2020 11:31:57 -0700 Subject: target/microblaze: Move mmu parameters to MicroBlazeCPUConfig The final 4 fields in MicroBlazeMMU are configuration constants. Move them into MicroBlazeCPUConfig where they belong. Remove the leading "c_" from the member names, as that presumably implied "config", and that should not be explicit in the location. Tested-by: Edgar E. Iglesias Reviewed-by: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'target/microblaze/cpu.c') diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index b9bb7f0cc7..fde646a7ad 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -135,10 +135,6 @@ static void mb_cpu_reset(DeviceState *dev) #else mb_cpu_write_msr(env, 0); mmu_init(&env->mmu); - env->mmu.c_mmu = 3; - env->mmu.c_mmu_tlb_access = 3; - env->mmu.c_mmu_zones = 16; - env->mmu.c_addr_mask = MAKE_64BIT_MASK(0, cpu->cfg.addr_size); #endif } @@ -232,6 +228,11 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **errp) cpu->cfg.pvr_regs[11] = ((cpu->cfg.use_mmu ? PVR11_USE_MMU : 0) | 16 << 17); + cpu->cfg.mmu = 3; + cpu->cfg.mmu_tlb_access = 3; + cpu->cfg.mmu_zones = 16; + cpu->cfg.addr_mask = MAKE_64BIT_MASK(0, cpu->cfg.addr_size); + mcc->parent_realize(dev, errp); } -- cgit v1.2.3