target-mips: Clean up other_cpu in helper_{d,e}vpe()
Free the variable name "other_cpu" for later use for MIPSCPU. Fix off-by-one indentation while at it. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
c7d4475a70
commit
81bad50ec4
@ -1874,35 +1874,35 @@ target_ulong helper_emt(void)
|
|||||||
|
|
||||||
target_ulong helper_dvpe(CPUMIPSState *env)
|
target_ulong helper_dvpe(CPUMIPSState *env)
|
||||||
{
|
{
|
||||||
CPUMIPSState *other_cpu = first_cpu;
|
CPUMIPSState *other_cpu_env = first_cpu;
|
||||||
target_ulong prev = env->mvp->CP0_MVPControl;
|
target_ulong prev = env->mvp->CP0_MVPControl;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
/* Turn off all VPEs except the one executing the dvpe. */
|
/* Turn off all VPEs except the one executing the dvpe. */
|
||||||
if (other_cpu != env) {
|
if (other_cpu_env != env) {
|
||||||
other_cpu->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
|
other_cpu_env->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
|
||||||
mips_vpe_sleep(other_cpu);
|
mips_vpe_sleep(other_cpu_env);
|
||||||
}
|
}
|
||||||
other_cpu = other_cpu->next_cpu;
|
other_cpu_env = other_cpu_env->next_cpu;
|
||||||
} while (other_cpu);
|
} while (other_cpu_env);
|
||||||
return prev;
|
return prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
target_ulong helper_evpe(CPUMIPSState *env)
|
target_ulong helper_evpe(CPUMIPSState *env)
|
||||||
{
|
{
|
||||||
CPUMIPSState *other_cpu = first_cpu;
|
CPUMIPSState *other_cpu_env = first_cpu;
|
||||||
target_ulong prev = env->mvp->CP0_MVPControl;
|
target_ulong prev = env->mvp->CP0_MVPControl;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (other_cpu != env
|
if (other_cpu_env != env
|
||||||
/* If the VPE is WFI, don't disturb its sleep. */
|
/* If the VPE is WFI, don't disturb its sleep. */
|
||||||
&& !mips_vpe_is_wfi(other_cpu)) {
|
&& !mips_vpe_is_wfi(other_cpu_env)) {
|
||||||
/* Enable the VPE. */
|
/* Enable the VPE. */
|
||||||
other_cpu->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
|
other_cpu_env->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
|
||||||
mips_vpe_wake(other_cpu); /* And wake it up. */
|
mips_vpe_wake(other_cpu_env); /* And wake it up. */
|
||||||
}
|
}
|
||||||
other_cpu = other_cpu->next_cpu;
|
other_cpu_env = other_cpu_env->next_cpu;
|
||||||
} while (other_cpu);
|
} while (other_cpu_env);
|
||||||
return prev;
|
return prev;
|
||||||
}
|
}
|
||||||
#endif /* !CONFIG_USER_ONLY */
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
|
Loading…
Reference in New Issue
Block a user