1697
1697
target_ulong helper_dvpe(CPUMIPSState *env)
1699
CPUMIPSState *other_cpu_env = first_cpu;
1699
CPUState *other_cs = first_cpu;
1700
1700
target_ulong prev = env->mvp->CP0_MVPControl;
1703
MIPSCPU *other_cpu = MIPS_CPU(other_cs);
1703
1704
/* Turn off all VPEs except the one executing the dvpe. */
1704
if (other_cpu_env != env) {
1705
MIPSCPU *other_cpu = mips_env_get_cpu(other_cpu_env);
1707
other_cpu_env->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
1705
if (&other_cpu->env != env) {
1706
other_cpu->env.mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
1708
1707
mips_vpe_sleep(other_cpu);
1710
other_cpu_env = other_cpu_env->next_cpu;
1711
} while (other_cpu_env);
1709
other_cs = other_cs->next_cpu;
1715
1714
target_ulong helper_evpe(CPUMIPSState *env)
1717
CPUMIPSState *other_cpu_env = first_cpu;
1716
CPUState *other_cs = first_cpu;
1718
1717
target_ulong prev = env->mvp->CP0_MVPControl;
1721
MIPSCPU *other_cpu = mips_env_get_cpu(other_cpu_env);
1720
MIPSCPU *other_cpu = MIPS_CPU(other_cs);
1723
if (other_cpu_env != env
1722
if (&other_cpu->env != env
1724
1723
/* If the VPE is WFI, don't disturb its sleep. */
1725
1724
&& !mips_vpe_is_wfi(other_cpu)) {
1726
1725
/* Enable the VPE. */
1727
other_cpu_env->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
1726
other_cpu->env.mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
1728
1727
mips_vpe_wake(other_cpu); /* And wake it up. */
1730
other_cpu_env = other_cpu_env->next_cpu;
1731
} while (other_cpu_env);
1729
other_cs = other_cs->next_cpu;
1734
1733
#endif /* !CONFIG_USER_ONLY */
2150
void cpu_unassigned_access(CPUMIPSState *env, hwaddr addr,
2151
int is_write, int is_exec, int unused, int size)
2148
void mips_cpu_unassigned_access(CPUState *cs, hwaddr addr,
2149
bool is_write, bool is_exec, int unused,
2152
MIPSCPU *cpu = MIPS_CPU(cs);
2153
CPUMIPSState *env = &cpu->env;
2154
2156
helper_raise_exception(env, EXCP_IBE);
2156
2158
helper_raise_exception(env, EXCP_DBE);
2158
2161
#endif /* !CONFIG_USER_ONLY */