Patchwork [RFC,qom-cpu,25/41] translate-all: Change tb_flush_jmp_cache() argument to CPUState

login
register
mail settings
Submitter Andreas Färber
Date Sept. 4, 2013, 9:05 a.m.
Message ID <1378285521-3230-26-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/272524/
State New
Headers show

Comments

Andreas Färber - Sept. 4, 2013, 9:05 a.m.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 cputlb.c              | 2 +-
 include/exec/cputlb.h | 2 +-
 translate-all.c       | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

Patch

diff --git a/cputlb.c b/cputlb.c
index e02663c..3721bfc 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -120,7 +120,7 @@  void tlb_flush_page(CPUArchState *env, target_ulong addr)
         tlb_flush_entry(&env->tlb_table[mmu_idx][i], addr);
     }
 
-    tb_flush_jmp_cache(env, addr);
+    tb_flush_jmp_cache(cpu, addr);
 }
 
 /* update the TLBs so that writes to code in the virtual page 'addr'
diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
index e21cb60..e1eb4d9 100644
--- a/include/exec/cputlb.h
+++ b/include/exec/cputlb.h
@@ -31,7 +31,7 @@  void tlb_set_dirty(CPUArchState *env, target_ulong vaddr);
 extern int tlb_flush_count;
 
 /* exec.c */
-void tb_flush_jmp_cache(CPUArchState *env, target_ulong addr);
+void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr);
 
 MemoryRegionSection *
 address_space_translate_for_iotlb(AddressSpace *as, hwaddr addr, hwaddr *xlat,
diff --git a/translate-all.c b/translate-all.c
index 6e5bfee..2254b9f 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1492,9 +1492,8 @@  void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
     cpu_resume_from_signal(env, NULL);
 }
 
-void tb_flush_jmp_cache(CPUArchState *env, target_ulong addr)
+void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr)
 {
-    CPUState *cpu = ENV_GET_CPU(env);
     unsigned int i;
 
     /* Discard jump cache entries for any tb which might potentially