From patchwork Fri Feb 1 12:38:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 217449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2EB8A2C0095 for ; Fri, 1 Feb 2013 23:43:10 +1100 (EST) Received: from localhost ([::1]:57650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1FuB-0008Mt-Jw for incoming@patchwork.ozlabs.org; Fri, 01 Feb 2013 07:39:43 -0500 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?= To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2013 13:38:31 +0100 Message-Id: <1359722312-2391-6-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH qom-cpu-next 5/6] cputlb: Pass CPUState to cpu_unlink_tb() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org CPUArchState is no longer needed. Signed-off-by: Andreas Färber --- exec.c | 2 +- translate-all.c | 9 +++++---- translate-all.h | 2 +- 3 Dateien geändert, 7 Zeilen hinzugefügt(+), 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 = ENV_GET_CPU(env); cpu->exit_request = 1; - cpu_unlink_tb(env); + cpu_unlink_tb(cpu); } 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) */ -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; @@ -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); } } @@ -1625,8 +1624,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); } /* 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 @@ /* 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 */