Patchwork [v2,11/13] target-sh4: Make copy_utlb_entry_itlb() take SuperHCPU

login
register
mail settings
Submitter Andreas Färber
Date April 13, 2012, 9:30 p.m.
Message ID <1334352618-4551-12-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/152430/
State New
Headers show

Comments

Andreas Färber - April 13, 2012, 9:30 p.m.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-sh4/helper.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Patch

diff --git a/target-sh4/helper.c b/target-sh4/helper.c
index d273097..ffe79ec 100644
--- a/target-sh4/helper.c
+++ b/target-sh4/helper.c
@@ -286,18 +286,18 @@  static void increment_urc(SuperHCPU *cpu)
 /* Copy and utlb entry into itlb
    Return entry
 */
-static int copy_utlb_entry_itlb(CPUSH4State *env, int utlb)
+static int copy_utlb_entry_itlb(SuperHCPU *cpu, int utlb)
 {
     int itlb;
 
     tlb_t * ientry;
-    itlb = itlb_replacement(env);
-    ientry = &env->itlb[itlb];
+    itlb = itlb_replacement(&cpu->env);
+    ientry = &cpu->env.itlb[itlb];
     if (ientry->v) {
-        tlb_flush_page(env, ientry->vpn << 10);
+        tlb_flush_page(&cpu->env, ientry->vpn << 10);
     }
-    *ientry = env->utlb[utlb];
-    update_itlb_use(env, itlb);
+    *ientry = cpu->env.utlb[utlb];
+    update_itlb_use(&cpu->env, itlb);
     return itlb;
 }
 
@@ -360,7 +360,7 @@  static int get_mmu_address(SuperHCPU *cpu, target_ulong *physical,
         } else {
             n = find_utlb_entry(cpu, address, use_asid);
             if (n >= 0) {
-                n = copy_utlb_entry_itlb(&cpu->env, n);
+                n = copy_utlb_entry_itlb(cpu, n);
                 matching = &cpu->env.itlb[n];
                 if (!(cpu->env.sr & SR_MD) && !(matching->pr & 2)) {
                     n = MMU_ITLB_VIOLATION;