]> git.proxmox.com Git - qemu.git/commitdiff
cputlb: Pass CPUState to cpu_unlink_tb()
authorAndreas Färber <afaerber@suse.de>
Thu, 17 Jan 2013 08:16:15 +0000 (09:16 +0100)
committerAndreas Färber <afaerber@suse.de>
Sat, 16 Feb 2013 13:51:00 +0000 (14:51 +0100)
CPUArchState is no longer needed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
exec.c
translate-all.c
translate-all.h

diff --git a/exec.c b/exec.c
index dbb893a08e60d8a4f058d0a7681e050b799ecc9b..a41bcb86943821496e21158dd11bfc93c25b92e5 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -495,7 +495,7 @@ void cpu_exit(CPUArchState *env)
     CPUState *cpu = ENV_GET_CPU(env);
 
     cpu->exit_request = 1;
-    cpu_unlink_tb(env);
+    cpu_unlink_tb(cpu);
 }
 
 void cpu_abort(CPUArchState *env, const char *fmt, ...)
index 52128aa0c459e61aa6cc0cd737b873a46dab48dd..b50fb89528df707e3a0d323648e1507745684f57 100644 (file)
@@ -1416,13 +1416,12 @@ void tb_invalidate_phys_addr(hwaddr addr)
 }
 #endif /* TARGET_HAS_ICE && !defined(CONFIG_USER_ONLY) */
 
-void cpu_unlink_tb(CPUArchState *env)
+void cpu_unlink_tb(CPUState *cpu)
 {
     /* FIXME: TB unchaining isn't SMP safe.  For now just ignore the
        problem and hope the cpu will stop of its own accord.  For userspace
        emulation this often isn't actually as bad as it sounds.  Often
        signals are used primarily to interrupt blocking syscalls.  */
-    CPUState *cpu = ENV_GET_CPU(env);
     TranslationBlock *tb;
     static spinlock_t interrupt_lock = SPIN_LOCK_UNLOCKED;
 
@@ -1476,7 +1475,7 @@ static void tcg_handle_interrupt(CPUArchState *env, int mask)
             cpu_abort(env, "Raised interrupt while not in I/O function");
         }
     } else {
-        cpu_unlink_tb(env);
+        cpu_unlink_tb(cpu);
     }
 }
 
@@ -1624,8 +1623,10 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
 
 void cpu_interrupt(CPUArchState *env, int mask)
 {
+    CPUState *cpu = ENV_GET_CPU(env);
+
     env->interrupt_request |= mask;
-    cpu_unlink_tb(env);
+    cpu_unlink_tb(cpu);
 }
 
 /*
index b181fb48ad297b473ee27f445176f88156d79d55..5c38819eb8a761d4e4499d259312c2d8026c919a 100644 (file)
@@ -28,7 +28,7 @@
 
 /* translate-all.c */
 void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len);
-void cpu_unlink_tb(CPUArchState *env);
+void cpu_unlink_tb(CPUState *cpu);
 void tb_check_watchpoint(CPUArchState *env);
 
 #endif /* TRANSLATE_ALL_H */