From patchwork Wed May 23 03:08:17 2012 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: 160800 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 96216B7000 for ; Wed, 23 May 2012 14:13:51 +1000 (EST) Received: from localhost ([::1]:38996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX1zB-0003vW-KW for incoming@patchwork.ozlabs.org; Tue, 22 May 2012 23:11:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX1x5-0001Uo-C2 for qemu-devel@nongnu.org; Tue, 22 May 2012 23:09:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX1wx-0005sH-Nw for qemu-devel@nongnu.org; Tue, 22 May 2012 23:09:30 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35657 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX1wx-0005rI-6J for qemu-devel@nongnu.org; Tue, 22 May 2012 23:09:23 -0400 Received: from relay2.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 0F44E978B8; Wed, 23 May 2012 05:09:22 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Wed, 23 May 2012 05:08:17 +0200 Message-Id: <1337742502-28565-55-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1337742502-28565-1-git-send-email-afaerber@suse.de> References: <1337742502-28565-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Aurelien Jarno Subject: [Qemu-devel] [PATCH qom-next 54/59] target-mips: Pass MIPSCPU to mips_tc_sleep() 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 Needed for mips_vpe_sleep(). Signed-off-by: Andreas Färber --- target-mips/op_helper.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index af62c8b..bfced36 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -778,8 +778,10 @@ static inline void mips_tc_wake(MIPSCPU *cpu, int tc) } } -static inline void mips_tc_sleep(CPUMIPSState *c, int tc) +static inline void mips_tc_sleep(MIPSCPU *cpu, int tc) { + CPUMIPSState *c = &cpu->env; + /* FIXME: TC reschedule. */ if (!mips_vpe_active(c)) { mips_vpe_sleep(c); @@ -1378,7 +1380,7 @@ void helper_mtc0_tchalt (target_ulong arg1) // TODO: Halt TC / Restart (if allocated+active) TC. if (env->active_tc.CP0_TCHalt & 1) { - mips_tc_sleep(env, env->current_tc); + mips_tc_sleep(mips_env_get_cpu(env), env->current_tc); } else { mips_tc_wake(mips_env_get_cpu(env), env->current_tc); } @@ -1397,7 +1399,7 @@ void helper_mttc0_tchalt (target_ulong arg1) other->tcs[other_tc].CP0_TCHalt = arg1; if (arg1 & 1) { - mips_tc_sleep(other, other_tc); + mips_tc_sleep(mips_env_get_cpu(other), other_tc); } else { mips_tc_wake(mips_env_get_cpu(other), other_tc); }