summaryrefslogtreecommitdiffstats
path: root/target-mips
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2015-08-17 09:34:10 +0200
committerRichard Henderson2015-09-11 17:15:28 +0200
commit97ed5ccdee95f0b98bedc601ff979e368583472c (patch)
tree5ee711528010f3700f13983b8222c2ca7ae85c83 /target-mips
parentMerge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-09-1... (diff)
downloadqemu-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-mips')
-rw-r--r--target-mips/cpu.h2
-rw-r--r--target-mips/op_helper.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index c91883d5e1..2acc4b3d0a 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -634,7 +634,7 @@ extern uint32_t cpu_rddsp(uint32_t mask_num, CPUMIPSState *env);
#define MMU_MODE1_SUFFIX _super
#define MMU_MODE2_SUFFIX _user
#define MMU_USER_IDX 2
-static inline int cpu_mmu_index (CPUMIPSState *env)
+static inline int cpu_mmu_index (CPUMIPSState *env, bool ifetch)
{
return env->hflags & MIPS_HFLAG_KSU;
}
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 809a061e29..1aa9e3c9e4 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -3629,7 +3629,7 @@ FOP_CONDN_S(sne, (float32_lt(fst1, fst0, &env->active_fpu.fp_status)
#if !defined(CONFIG_USER_ONLY)
#define MEMOP_IDX(DF) \
TCGMemOpIdx oi = make_memop_idx(MO_TE | DF | MO_UNALN, \
- cpu_mmu_index(env));
+ cpu_mmu_index(env, false));
#else
#define MEMOP_IDX(DF)
#endif
@@ -3685,7 +3685,7 @@ void helper_msa_st_ ## TYPE(CPUMIPSState *env, uint32_t wd, \
target_ulong addr) \
{ \
wr_t *pwd = &(env->active_fpu.fpr[wd].wr); \
- int mmu_idx = cpu_mmu_index(env); \
+ int mmu_idx = cpu_mmu_index(env, false); \
int i; \
MEMOP_IDX(DF) \
ensure_writable_pages(env, addr, mmu_idx, GETRA()); \