From 907a5e32f293a0af8875973d4cce12b96bea5bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 17 Jan 2013 09:16:15 +0100 Subject: cputlb: Pass CPUState to cpu_unlink_tb() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CPUArchState is no longer needed. Signed-off-by: Andreas Färber --- translate-all.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'translate-all.c') diff --git a/translate-all.c b/translate-all.c index 52128aa0c4..b50fb89528 100644 --- a/translate-all.c +++ b/translate-all.c @@ -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); } /* -- cgit v1.2.1