Received: from eggs.gnu.org ([208.118.235.92]:38804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMRgV-0002aZ-6e for qemu-devel@nongnu.org; Thu, 11 Oct 2012 18:56:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMRgT-0003sS-25 for qemu-devel@nongnu.org; Thu, 11 Oct 2012 18:56:55 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49217 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMRgS-0003s6-P5 for qemu-devel@nongnu.org; Thu, 11 Oct 2012 18:56:52 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 12 Oct 2012 00:56:34 +0200 Message-Id: <1349996197-11054-3-git-send-email-afaerber@suse.de> In-Reply-To: <1349996197-11054-1-git-send-email-afaerber@suse.de> References: <1349996197-11054-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 v2 2/5] target-mips: Pass MIPSCPU to mips_tc_wake() 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?= , aurelien@aurel32.net Needed for changing mips_vpe_is_wfi() argument type to MIPSCPU. Signed-off-by: Andreas F=C3=A4rber --- target-mips/op_helper.c | 11 ++++++++--- 1 Datei ge=C3=A4ndert, 8 Zeilen hinzugef=C3=BCgt(+), 3 Zeilen entfernt(-= ) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 1051c44..e721a4d 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -737,8 +737,10 @@ static inline void mips_vpe_sleep(CPUMIPSState *c) cpu_reset_interrupt(c, CPU_INTERRUPT_WAKE); } =20 -static inline void mips_tc_wake(CPUMIPSState *c, int tc) +static inline void mips_tc_wake(MIPSCPU *cpu, int tc) { + CPUMIPSState *c =3D &cpu->env; + /* FIXME: TC reschedule. */ if (mips_vpe_active(c) && !mips_vpe_is_wfi(c)) { mips_vpe_wake(c); @@ -1342,13 +1344,15 @@ void helper_mttc0_tcrestart(CPUMIPSState *env, ta= rget_ulong arg1) =20 void helper_mtc0_tchalt(CPUMIPSState *env, target_ulong arg1) { + MIPSCPU *cpu =3D mips_env_get_cpu(env); + env->active_tc.CP0_TCHalt =3D arg1 & 0x1; =20 // TODO: Halt TC / Restart (if allocated+active) TC. if (env->active_tc.CP0_TCHalt & 1) { mips_tc_sleep(env, env->current_tc); } else { - mips_tc_wake(env, env->current_tc); + mips_tc_wake(cpu, env->current_tc); } } =20 @@ -1356,6 +1360,7 @@ void helper_mttc0_tchalt(CPUMIPSState *env, target_= ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); + MIPSCPU *other_cpu =3D mips_env_get_cpu(other); =20 // TODO: Halt TC / Restart (if allocated+active) TC. =20 @@ -1367,7 +1372,7 @@ void helper_mttc0_tchalt(CPUMIPSState *env, target_= ulong arg1) if (arg1 & 1) { mips_tc_sleep(other, other_tc); } else { - mips_tc_wake(other, other_tc); + mips_tc_wake(other_cpu, other_tc); } } =20 --=20 1.7.10.4