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

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

Comments

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

Patch

diff --git a/exec.c b/exec.c
index 06fb881..0a81967 100644
--- a/exec.c
+++ b/exec.c
@@ -1480,7 +1480,7 @@  static void check_watchpoint(int offset, int len_mask, int flags)
             wp->flags |= BP_WATCHPOINT_HIT;
             if (!cpu->watchpoint_hit) {
                 cpu->watchpoint_hit = wp;
-                tb_check_watchpoint(env);
+                tb_check_watchpoint(cpu);
                 if (wp->flags & BP_STOP_BEFORE_ACCESS) {
                     cpu->exception_index = EXCP_DEBUG;
                     cpu_loop_exit(cpu);
diff --git a/translate-all.c b/translate-all.c
index 0dd6a60..22a5b80 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1384,9 +1384,9 @@  void tb_invalidate_phys_addr(hwaddr addr)
 }
 #endif /* TARGET_HAS_ICE && !defined(CONFIG_USER_ONLY) */
 
-void tb_check_watchpoint(CPUArchState *env)
+void tb_check_watchpoint(CPUState *cpu)
 {
-    CPUState *cpu = ENV_GET_CPU(env);
+    CPUArchState *env = cpu->env_ptr;
     TranslationBlock *tb;
 
     tb = tb_find_pc(cpu->mem_io_pc);
diff --git a/translate-all.h b/translate-all.h
index 5c38819..78e88d3 100644
--- a/translate-all.h
+++ b/translate-all.h
@@ -29,6 +29,6 @@ 
 /* translate-all.c */
 void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len);
 void cpu_unlink_tb(CPUState *cpu);
-void tb_check_watchpoint(CPUArchState *env);
+void tb_check_watchpoint(CPUState *cpu);
 
 #endif /* TRANSLATE_ALL_H */