mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/openrisc: Call cpu_openrisc_clock_init() in cpu_realize()
OpenRISC timer is architecturally tied to the CPU. It doesn't belong to the machine init() code to instanciate it: move its creation when a vCPU is realized (after being created). Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250114231304.77150-1-philmd@linaro.org>
This commit is contained in:
parent
40b839cb84
commit
befd818b58
3 changed files with 4 additions and 4 deletions
|
@ -306,8 +306,6 @@ static void openrisc_sim_init(MachineState *machine)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu_openrisc_clock_init(cpus[n]);
|
|
||||||
|
|
||||||
qemu_register_reset(main_cpu_reset, cpus[n]);
|
qemu_register_reset(main_cpu_reset, cpus[n]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -487,8 +487,6 @@ static void openrisc_virt_init(MachineState *machine)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu_openrisc_clock_init(cpus[n]);
|
|
||||||
|
|
||||||
qemu_register_reset(main_cpu_reset, cpus[n]);
|
qemu_register_reset(main_cpu_reset, cpus[n]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,6 +165,10 @@ static void openrisc_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||||
qemu_init_vcpu(cs);
|
qemu_init_vcpu(cs);
|
||||||
cpu_reset(cs);
|
cpu_reset(cs);
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
|
cpu_openrisc_clock_init(OPENRISC_CPU(dev));
|
||||||
|
#endif
|
||||||
|
|
||||||
occ->parent_realize(dev, errp);
|
occ->parent_realize(dev, errp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue