diff options
Diffstat (limited to 'target/nios2')
-rw-r--r-- | target/nios2/cpu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index 186af49..b00223e 100644 --- a/target/nios2/cpu.c +++ b/target/nios2/cpu.c @@ -66,14 +66,12 @@ static void nios2_cpu_reset(CPUState *cs) static void nios2_cpu_initfn(Object *obj) { - CPUState *cs = CPU(obj); Nios2CPU *cpu = NIOS2_CPU(obj); - CPUNios2State *env = &cpu->env; - cs->env_ptr = env; + cpu_set_cpustate_pointers(cpu); #if !defined(CONFIG_USER_ONLY) - mmu_init(env); + mmu_init(&cpu->env); #endif } |