Patchwork [RFC,qom-cpu,32/41] cputlb: Change tlb_set_page() argument to CPUState

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

Comments

Andreas Färber - Sept. 4, 2013, 9:05 a.m.
It no longer needs CPUArchState since moving tlb_flush_* to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 cputlb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/cputlb.c b/cputlb.c
index e5b6145..ddcd2cd 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -212,10 +212,9 @@  void tlb_set_dirty(CPUArchState *env, target_ulong vaddr)
 
 /* Our TLB does not support large pages, so remember the area covered by
    large pages and trigger a full TLB flush if these are invalidated.  */
-static void tlb_add_large_page(CPUArchState *env, target_ulong vaddr,
+static void tlb_add_large_page(CPUState *cpu, target_ulong vaddr,
                                target_ulong size)
 {
-    CPUState *cpu = ENV_GET_CPU(env);
     target_ulong mask = ~(size - 1);
 
     if ((target_ulong)cpu->tlb_flush_addr == (target_ulong)-1) {
@@ -252,7 +251,7 @@  void tlb_set_page(CPUArchState *env, target_ulong vaddr,
 
     assert(size >= TARGET_PAGE_SIZE);
     if (size != TARGET_PAGE_SIZE) {
-        tlb_add_large_page(env, vaddr, size);
+        tlb_add_large_page(cpu, vaddr, size);
     }
 
     sz = size;