CPUState *other_cs = first_cpu;
target_ulong prev = env->mvp->CP0_MVPControl;
- do {
+ CPU_FOREACH(other_cs) {
MIPSCPU *other_cpu = MIPS_CPU(other_cs);
/* Turn off all VPEs except the one executing the dvpe. */
if (&other_cpu->env != env) {
other_cpu->env.mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
mips_vpe_sleep(other_cpu);
}
- other_cs = other_cs->next_cpu;
- } while (other_cs);
+ }
return prev;
}
CPUState *other_cs = first_cpu;
target_ulong prev = env->mvp->CP0_MVPControl;
- do {
+ CPU_FOREACH(other_cs) {
MIPSCPU *other_cpu = MIPS_CPU(other_cs);
if (&other_cpu->env != env
other_cpu->env.mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
mips_vpe_wake(other_cpu); /* And wake it up. */
}
- other_cs = other_cs->next_cpu;
- } while (other_cs);
+ }
return prev;
}
#endif /* !CONFIG_USER_ONLY */