Message ID | 20210721132144.39508-4-lucas.araujo@eldorado.org.br |
---|---|
State | New |
Headers | show |
Series | target/ppc: MMU clean up | expand |
On Wed, Jul 21, 2021 at 10:21:44AM -0300, Lucas Mateus Castro (alqotel) wrote: > moved store_40x_sler from mmu_common.c to helper_regs.c as it was > more appropriate This message needs a rationale to explain why this is more appropriate. > > Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br> > --- > target/ppc/helper_regs.c | 12 ++++++++++++ > target/ppc/mmu_common.c | 10 ---------- > 2 files changed, 12 insertions(+), 10 deletions(-) > > diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c > index 3723872aa6..405450d863 100644 > --- a/target/ppc/helper_regs.c > +++ b/target/ppc/helper_regs.c > @@ -258,6 +258,18 @@ int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv) > return excp; > } > > +#ifdef CONFIG_SOFTMMU > +void store_40x_sler(CPUPPCState *env, uint32_t val) > +{ > + /* XXX: TO BE FIXED */ > + if (val != 0x00000000) { > + cpu_abort(env_cpu(env), > + "Little-endian regions are not supported by now\n"); > + } > + env->spr[SPR_405_SLER] = val; > +} > +#endif /* CONFIG_SOFTMMU */ > + > #ifndef CONFIG_USER_ONLY > void check_tlb_flush(CPUPPCState *env, bool global) > { > diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c > index a8bd418f18..e206be9d05 100644 > --- a/target/ppc/mmu_common.c > +++ b/target/ppc/mmu_common.c > @@ -622,16 +622,6 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx, > return ret; > } > > -void store_40x_sler(CPUPPCState *env, uint32_t val) > -{ > - /* XXX: TO BE FIXED */ > - if (val != 0x00000000) { > - cpu_abort(env_cpu(env), > - "Little-endian regions are not supported by now\n"); > - } > - env->spr[SPR_405_SLER] = val; > -} > - > static int mmubooke_check_tlb(CPUPPCState *env, ppcemb_tlb_t *tlb, > hwaddr *raddr, int *prot, target_ulong address, > MMUAccessType access_type, int i)
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c index 3723872aa6..405450d863 100644 --- a/target/ppc/helper_regs.c +++ b/target/ppc/helper_regs.c @@ -258,6 +258,18 @@ int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv) return excp; } +#ifdef CONFIG_SOFTMMU +void store_40x_sler(CPUPPCState *env, uint32_t val) +{ + /* XXX: TO BE FIXED */ + if (val != 0x00000000) { + cpu_abort(env_cpu(env), + "Little-endian regions are not supported by now\n"); + } + env->spr[SPR_405_SLER] = val; +} +#endif /* CONFIG_SOFTMMU */ + #ifndef CONFIG_USER_ONLY void check_tlb_flush(CPUPPCState *env, bool global) { diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index a8bd418f18..e206be9d05 100644 --- a/target/ppc/mmu_common.c +++ b/target/ppc/mmu_common.c @@ -622,16 +622,6 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx, return ret; } -void store_40x_sler(CPUPPCState *env, uint32_t val) -{ - /* XXX: TO BE FIXED */ - if (val != 0x00000000) { - cpu_abort(env_cpu(env), - "Little-endian regions are not supported by now\n"); - } - env->spr[SPR_405_SLER] = val; -} - static int mmubooke_check_tlb(CPUPPCState *env, ppcemb_tlb_t *tlb, hwaddr *raddr, int *prot, target_ulong address, MMUAccessType access_type, int i)
moved store_40x_sler from mmu_common.c to helper_regs.c as it was more appropriate Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br> --- target/ppc/helper_regs.c | 12 ++++++++++++ target/ppc/mmu_common.c | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-)