qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH qom-next 52/59] target-mips: Pass MIPSCPU to mips_tc


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-next 52/59] target-mips: Pass MIPSCPU to mips_tc_wake()
Date: Wed, 23 May 2012 05:08:15 +0200

Needed for mips_vpe_is_wfi().

Signed-off-by: Andreas Färber <address@hidden>
---
 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 66037ac..50e2dd7 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -766,8 +766,10 @@ static inline void mips_vpe_sleep(CPUMIPSState *c)
     cpu_reset_interrupt(c, CPU_INTERRUPT_WAKE);
 }
 
-static inline void mips_tc_wake(CPUMIPSState *c, int tc)
+static inline void mips_tc_wake(MIPSCPU *cpu, int tc)
 {
+    CPUMIPSState *c = &cpu->env;
+
     /* FIXME: TC reschedule.  */
     if (mips_vpe_active(c) && !mips_vpe_is_wfi(c)) {
         mips_vpe_wake(c);
@@ -1376,7 +1378,7 @@ void helper_mtc0_tchalt (target_ulong arg1)
     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(mips_env_get_cpu(env), env->current_tc);
     }
 }
 
@@ -1395,7 +1397,7 @@ void helper_mttc0_tchalt (target_ulong arg1)
     if (arg1 & 1) {
         mips_tc_sleep(other, other_tc);
     } else {
-        mips_tc_wake(other, other_tc);
+        mips_tc_wake(mips_env_get_cpu(other), other_tc);
     }
 }
 
-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]