remove uc->cpus
This commit is contained in:
@@ -1798,37 +1798,43 @@ target_ulong helper_emt(void)
|
||||
target_ulong helper_dvpe(CPUMIPSState *env)
|
||||
{
|
||||
struct uc_struct *uc = env->uc;
|
||||
CPUState *other_cs = first_cpu;
|
||||
CPUState *other_cs = uc->cpu;
|
||||
target_ulong prev = env->mvp->CP0_MVPControl;
|
||||
|
||||
// TODO: #642 SMP groups
|
||||
/*
|
||||
CPU_FOREACH(other_cs) {
|
||||
MIPSCPU *other_cpu = MIPS_CPU(uc, other_cs);
|
||||
/* Turn off all VPEs except the one executing the dvpe. */
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
*/
|
||||
return prev;
|
||||
}
|
||||
|
||||
target_ulong helper_evpe(CPUMIPSState *env)
|
||||
{
|
||||
struct uc_struct *uc = env->uc;
|
||||
CPUState *other_cs = first_cpu;
|
||||
CPUState *other_cs = uc->cpu;
|
||||
target_ulong prev = env->mvp->CP0_MVPControl;
|
||||
|
||||
// TODO: #642 SMP groups
|
||||
/*
|
||||
CPU_FOREACH(other_cs) {
|
||||
MIPSCPU *other_cpu = MIPS_CPU(uc, other_cs);
|
||||
|
||||
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)) {
|
||||
/* Enable the VPE. */
|
||||
// Enable the VPE.
|
||||
other_cpu->env.mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
|
||||
mips_vpe_wake(other_cpu); /* And wake it up. */
|
||||
mips_vpe_wake(other_cpu); // And wake it up.
|
||||
}
|
||||
}
|
||||
*/
|
||||
return prev;
|
||||
}
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
@@ -61,7 +61,7 @@ void mips_release(void *ctx)
|
||||
void mips_reg_reset(struct uc_struct *uc)
|
||||
{
|
||||
(void)uc;
|
||||
CPUArchState *env = first_cpu->env_ptr;
|
||||
CPUArchState *env = uc->cpu->env_ptr;
|
||||
memset(env->active_tc.gpr, 0, sizeof(env->active_tc.gpr));
|
||||
|
||||
env->active_tc.PC = 0;
|
||||
@@ -69,7 +69,7 @@ void mips_reg_reset(struct uc_struct *uc)
|
||||
|
||||
int mips_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int count)
|
||||
{
|
||||
CPUState *mycpu = first_cpu;
|
||||
CPUState *mycpu = uc->cpu;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
@@ -92,7 +92,7 @@ int mips_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int cou
|
||||
|
||||
int mips_reg_write(struct uc_struct *uc, unsigned int *regs, void *const *vals, int count)
|
||||
{
|
||||
CPUState *mycpu = first_cpu;
|
||||
CPUState *mycpu = uc->cpu;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
||||
Reference in New Issue
Block a user