Received: from eggs.gnu.org ([208.118.235.92]:60238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1FtT-0006tf-GR for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:39:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1FtS-00029N-Ch for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:38:59 -0500 Received: from cantor2.suse.de ([195.135.220.15]:56680 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1FtR-000293-Qw for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:38:58 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id DDB3CA41E0 for ; Fri, 1 Feb 2013 13:38:56 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 1 Feb 2013 13:38:31 +0100 Message-Id: <1359722312-2391-6-git-send-email-afaerber@suse.de> In-Reply-To: <1359722312-2391-1-git-send-email-afaerber@suse.de> References: <1359722312-2391-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-cpu-next 5/6] cputlb: Pass CPUState to cpu_unlink_tb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= CPUArchState is no longer needed. Signed-off-by: Andreas F=C3=A4rber --- exec.c | 2 +- translate-all.c | 9 +++++---- translate-all.h | 2 +- 3 Dateien ge=C3=A4ndert, 7 Zeilen hinzugef=C3=BCgt(+), 6 Zeilen entfernt= (-) diff --git a/exec.c b/exec.c index dbb893a..a41bcb8 100644 --- a/exec.c +++ b/exec.c @@ -495,7 +495,7 @@ void cpu_exit(CPUArchState *env) CPUState *cpu =3D ENV_GET_CPU(env); =20 cpu->exit_request =3D 1; - cpu_unlink_tb(env); + cpu_unlink_tb(cpu); } =20 void cpu_abort(CPUArchState *env, const char *fmt, ...) diff --git a/translate-all.c b/translate-all.c index 0122fc5..19bc414 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1425,13 +1425,12 @@ void tb_invalidate_phys_addr(hwaddr addr) } #endif /* TARGET_HAS_ICE && !defined(CONFIG_USER_ONLY) */ =20 -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 usersp= ace emulation this often isn't actually as bad as it sounds. Often signals are used primarily to interrupt blocking syscalls. */ - CPUState *cpu =3D ENV_GET_CPU(env); TranslationBlock *tb; static spinlock_t interrupt_lock =3D SPIN_LOCK_UNLOCKED; =20 @@ -1485,7 +1484,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); } } =20 @@ -1625,8 +1624,10 @@ void dump_exec_info(FILE *f, fprintf_function cpu_= fprintf) =20 void cpu_interrupt(CPUArchState *env, int mask) { + CPUState *cpu =3D ENV_GET_CPU(env); + env->interrupt_request |=3D mask; - cpu_unlink_tb(env); + cpu_unlink_tb(cpu); } =20 /* diff --git a/translate-all.h b/translate-all.h index b181fb4..5c38819 100644 --- a/translate-all.h +++ b/translate-all.h @@ -28,7 +28,7 @@ =20 /* 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); =20 #endif /* TRANSLATE_ALL_H */ --=20 1.7.10.4