mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
cpus: Remove CPUClass::has_work() handler
All handlers have been converted to SysemuCPUOps::has_work(). Remove CPUClass::has_work along with cpu_common_has_work() and simplify cpu_has_work(), making SysemuCPUOps::has_work handler mandatory. Note, since cpu-common.c is in meson's common_ss[] source set, we must define cpu_exec_class_post_init() in cpu-target.c (which is in the specific_ss[] source set) to have CONFIG_USER_ONLY defined. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250125170125.32855-25-philmd@linaro.org>
This commit is contained in:
parent
f37799c6c1
commit
d0a4ccae95
5 changed files with 16 additions and 15 deletions
|
@ -134,11 +134,6 @@ static void cpu_common_reset_hold(Object *obj, ResetType type)
|
|||
cpu_exec_reset_hold(cpu);
|
||||
}
|
||||
|
||||
static bool cpu_common_has_work(CPUState *cs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model)
|
||||
{
|
||||
ObjectClass *oc;
|
||||
|
@ -259,6 +254,8 @@ static void cpu_common_initfn(Object *obj)
|
|||
{
|
||||
CPUState *cpu = CPU(obj);
|
||||
|
||||
cpu_exec_class_post_init(CPU_GET_CLASS(obj));
|
||||
|
||||
/* cache the cpu class for the hotpath */
|
||||
cpu->cc = CPU_GET_CLASS(cpu);
|
||||
|
||||
|
@ -331,7 +328,6 @@ static void cpu_common_class_init(ObjectClass *klass, void *data)
|
|||
|
||||
k->parse_features = cpu_common_parse_features;
|
||||
k->get_arch_id = cpu_common_get_arch_id;
|
||||
k->has_work = cpu_common_has_work;
|
||||
k->gdb_read_register = cpu_common_gdb_read_register;
|
||||
k->gdb_write_register = cpu_common_gdb_write_register;
|
||||
set_bit(DEVICE_CATEGORY_CPU, dc->categories);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue