qemu-devel
[Top][All Lists]
Advanced

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

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


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

Needed for moving halted field to CPUState.

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 bfced36..d26c9fb 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -760,8 +760,10 @@ static inline void mips_vpe_wake(CPUMIPSState *c)
     cpu_interrupt(c, CPU_INTERRUPT_WAKE);
 }
 
-static inline void mips_vpe_sleep(CPUMIPSState *c)
+static inline void mips_vpe_sleep(MIPSCPU *cpu)
 {
+    CPUMIPSState *c = &cpu->env;
+
     /* The VPE was shut off, really go to bed.
        Reset any old _WAKE requests.  */
     c->halted = 1;
@@ -784,7 +786,7 @@ static inline void mips_tc_sleep(MIPSCPU *cpu, int tc)
 
     /* FIXME: TC reschedule.  */
     if (!mips_vpe_active(c)) {
-        mips_vpe_sleep(c);
+        mips_vpe_sleep(cpu);
     }
 }
 
@@ -1915,7 +1917,7 @@ target_ulong helper_dvpe(void)
         /* Turn off all VPEs except the one executing the dvpe.  */
         if (other_cpu != env) {
             other_cpu->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
-            mips_vpe_sleep(other_cpu);
+            mips_vpe_sleep(mips_env_get_cpu(other_cpu));
         }
         other_cpu = other_cpu->next_cpu;
     } while (other_cpu);
-- 
1.7.7




reply via email to

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