aboutsummaryrefslogtreecommitdiff
path: root/target-cris/mmu.c
diff options
context:
space:
mode:
authoredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-22 20:51:28 +0000
committeredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-22 20:51:28 +0000
commit28de16da38f20b3fe76fa80d10561c3a998342e2 (patch)
treecd05930d4e9a1e936e20ddf9c11a1d9d4f18c3b7 /target-cris/mmu.c
parent4a6b819c09473acc362a9959603017a549d85ce3 (diff)
CRIS: Improve ASID related TLB flushes.
* Speedup and correct ASID (PID) related TLB flushes. * Use 64bit tcg load/stores to emulate movem. * Remove unused helpers and other minor cleanups. Signed-off-by: Edgar E. Iglesias <edgar@axis.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5302 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-cris/mmu.c')
-rw-r--r--target-cris/mmu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-cris/mmu.c b/target-cris/mmu.c
index 5d21eaa5f4..f270d5b8fc 100644
--- a/target-cris/mmu.c
+++ b/target-cris/mmu.c
@@ -140,7 +140,7 @@ static int cris_mmu_translate_page(struct cris_mmu_result_t *res,
r_cause = env->sregs[SFR_R_MM_CAUSE];
r_cfg = env->sregs[SFR_RW_MM_CFG];
- pid = env->pregs[PR_PID];
+ pid = env->pregs[PR_PID] & 0xff;
switch (rw) {
case 2: rwcause = CRIS_MMU_ERR_EXEC; mmu = 0; break;
@@ -270,7 +270,7 @@ static int cris_mmu_translate_page(struct cris_mmu_result_t *res,
/* Update RW_MM_CAUSE. */
set_field(&r_cause, rwcause, 8, 2);
set_field(&r_cause, vpage, 13, 19);
- set_field(&r_cause, env->pregs[PR_PID], 0, 8);
+ set_field(&r_cause, pid, 0, 8);
env->sregs[SFR_R_MM_CAUSE] = r_cause;
D(printf("refill vaddr=%x pc=%x\n", vaddr, env->pc));
}
@@ -280,7 +280,7 @@ static int cris_mmu_translate_page(struct cris_mmu_result_t *res,
__func__, rw, match, env->pc,
vaddr, vpage,
tlb_vpn, tlb_pfn, tlb_pid,
- env->pregs[PR_PID],
+ pid,
r_cause,
env->sregs[SFR_RW_MM_TLB_SEL],
env->regs[R_SP], env->pregs[PR_USP], env->ksp));
@@ -315,7 +315,7 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid)
/* Kernel protected areas need to be flushed
as well. */
- if (tlb_v && !tlb_g) {
+ if (tlb_v && !tlb_g && (tlb_pid == pid || tlb_k)) {
vaddr = tlb_vpn << TARGET_PAGE_BITS;
D(fprintf(logfile,
"flush pid=%x vaddr=%x\n",