diff mbox

[RFC,qom-cpu,31/41] exec: Change memory_region_section_get_iotlb() argument to CPUState

Message ID 1378285521-3230-32-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

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

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 cputlb.c              | 3 ++-
 exec.c                | 3 +--
 include/exec/cputlb.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/cputlb.c b/cputlb.c
index bd5cf0e..e5b6145 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -241,6 +241,7 @@  void tlb_set_page(CPUArchState *env, target_ulong vaddr,
                   hwaddr paddr, int prot,
                   int mmu_idx, target_ulong size)
 {
+    CPUState *cpu = ENV_GET_CPU(env);
     MemoryRegionSection *section;
     unsigned int index;
     target_ulong address;
@@ -276,7 +277,7 @@  void tlb_set_page(CPUArchState *env, target_ulong vaddr,
     }
 
     code_address = address;
-    iotlb = memory_region_section_get_iotlb(env, section, vaddr, paddr, xlat,
+    iotlb = memory_region_section_get_iotlb(cpu, section, vaddr, paddr, xlat,
                                             prot, &address);
 
     index = (vaddr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
diff --git a/exec.c b/exec.c
index 5f133e4..ffbf4c3 100644
--- a/exec.c
+++ b/exec.c
@@ -677,14 +677,13 @@  static int cpu_physical_memory_set_dirty_tracking(int enable)
     return ret;
 }
 
-hwaddr memory_region_section_get_iotlb(CPUArchState *env,
+hwaddr memory_region_section_get_iotlb(CPUState *cpu,
                                        MemoryRegionSection *section,
                                        target_ulong vaddr,
                                        hwaddr paddr, hwaddr xlat,
                                        int prot,
                                        target_ulong *address)
 {
-    CPUState *cpu = ENV_GET_CPU(env);
     hwaddr iotlb;
     CPUWatchpoint *wp;
 
diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
index 31df03c..b8ecd6f 100644
--- a/include/exec/cputlb.h
+++ b/include/exec/cputlb.h
@@ -36,7 +36,7 @@  void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr);
 MemoryRegionSection *
 address_space_translate_for_iotlb(AddressSpace *as, hwaddr addr, hwaddr *xlat,
                                   hwaddr *plen);
-hwaddr memory_region_section_get_iotlb(CPUArchState *env,
+hwaddr memory_region_section_get_iotlb(CPUState *cpu,
                                        MemoryRegionSection *section,
                                        target_ulong vaddr,
                                        hwaddr paddr, hwaddr xlat,