summaryrefslogtreecommitdiff
path: root/target-mips
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-10-12 00:56:37 +0200
committerAurelien Jarno <aurelien@aurel32.net>2012-10-17 01:32:11 +0200
commit6f4d6b09088ee161ff4be0e4db4e4c0962c79070 (patch)
treeb8ef4e0f688bb1492276d0ddabc906f890e6a9ea /target-mips
parentc6679e9038027e28b0360039d2bb7d3aa55b934e (diff)
target-mips: Pass MIPSCPU to mips_vpe_sleep()
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-mips')
-rw-r--r--target-mips/op_helper.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 5710dd08df..05b7730987 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -731,8 +731,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;
@@ -755,7 +757,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);
}
}
@@ -1889,8 +1891,10 @@ target_ulong helper_dvpe(CPUMIPSState *env)
do {
/* Turn off all VPEs except the one executing the dvpe. */
if (other_cpu_env != env) {
+ MIPSCPU *other_cpu = mips_env_get_cpu(other_cpu_env);
+
other_cpu_env->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
- mips_vpe_sleep(other_cpu_env);
+ mips_vpe_sleep(other_cpu);
}
other_cpu_env = other_cpu_env->next_cpu;
} while (other_cpu_env);