diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2018-05-15 23:44:28 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2018-05-29 09:35:15 +0200 |
commit | d10367e035eab12c77b83b5985915ff7f003de1f (patch) | |
tree | ea9d4516c5827f69b94850f18ddc17ccb72c5e10 /target/microblaze/cpu.h | |
parent | 923ce2e6af7f8228d2ccb3ff272ea0fad855618c (diff) | |
download | qemu-d10367e035eab12c77b83b5985915ff7f003de1f.zip qemu-d10367e035eab12c77b83b5985915ff7f003de1f.tar.gz qemu-d10367e035eab12c77b83b5985915ff7f003de1f.tar.bz2 |
target-microblaze: Consolidate MMU enabled checks
Consolidate MMU enabled checks to cpu_mmu_index().
No functional changes.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'target/microblaze/cpu.h')
-rw-r--r-- | target/microblaze/cpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index c77ca2d..3c4e0ba 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -360,8 +360,10 @@ int cpu_mb_signal_handler(int host_signum, void *pinfo, static inline int cpu_mmu_index (CPUMBState *env, bool ifetch) { + MicroBlazeCPU *cpu = mb_env_get_cpu(env); + /* Are we in nommu mode?. */ - if (!(env->sregs[SR_MSR] & MSR_VM)) { + if (!(env->sregs[SR_MSR] & MSR_VM) || !cpu->cfg.use_mmu) { return MMU_NOMMU_IDX; } |