diff options
author | Benjamin Herrenschmidt | 2015-08-17 09:34:10 +0200 |
---|---|---|
committer | Richard Henderson | 2015-09-11 17:15:28 +0200 |
commit | 97ed5ccdee95f0b98bedc601ff979e368583472c (patch) | |
tree | 5ee711528010f3700f13983b8222c2ca7ae85c83 /target-sh4 | |
parent | Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-09-1... (diff) | |
download | qemu-97ed5ccdee95f0b98bedc601ff979e368583472c.tar.gz qemu-97ed5ccdee95f0b98bedc601ff979e368583472c.tar.xz qemu-97ed5ccdee95f0b98bedc601ff979e368583472c.zip |
tlb: Add "ifetch" argument to cpu_mmu_index()
This is set to true when the index is for an instruction fetch
translation.
The core get_page_addr_code() sets it, as do the SOFTMMU_CODE_ACCESS
acessors.
All targets ignore it for now, and all other callers pass "false".
This will allow targets who wish to split the mmu index between
instruction and data accesses to do so. A subsequent patch will
do just that for PowerPC.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Message-Id: <1439796853-4410-2-git-send-email-benh@kernel.crashing.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-sh4')
-rw-r--r-- | target-sh4/cpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h index 34bb3d7799..1f68b27a90 100644 --- a/target-sh4/cpu.h +++ b/target-sh4/cpu.h @@ -235,7 +235,7 @@ void cpu_load_tlb(CPUSH4State * env); #define MMU_MODE0_SUFFIX _kernel #define MMU_MODE1_SUFFIX _user #define MMU_USER_IDX 1 -static inline int cpu_mmu_index (CPUSH4State *env) +static inline int cpu_mmu_index (CPUSH4State *env, bool ifetch) { return (env->sr & (1u << SR_MD)) == 0 ? 1 : 0; } |