summary refs log tree commit diff stats
path: root/include/hw/core/cpu.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-26 08:17:59 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-09 17:00:47 +0100
commitd0a4ccae953b7482a682b9b9f8619804059ecc89 (patch)
treeab0245ac09ee186750de5b22f15c4cc519b8de02 /include/hw/core/cpu.h
parentf37799c6c1d2e8fb43f5e1f100f26c5401d9b3ff (diff)
downloadfocaccia-qemu-d0a4ccae953b7482a682b9b9f8619804059ecc89.tar.gz
focaccia-qemu-d0a4ccae953b7482a682b9b9f8619804059ecc89.zip
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>
Diffstat (limited to 'include/hw/core/cpu.h')
-rw-r--r--include/hw/core/cpu.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index a54dd2cf69..5d11d26556 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -104,7 +104,6 @@ struct SysemuCPUOps;
  *                 instantiatable CPU type.
  * @parse_features: Callback to parse command line arguments.
  * @reset_dump_flags: #CPUDumpFlags to use for reset logging.
- * @has_work: Callback for checking if there is work to do.
  * @mmu_index: Callback for choosing softmmu mmu index;
  *       may be used internally by memory_rw_debug without TCG.
  * @memory_rw_debug: Callback for GDB memory access.
@@ -153,7 +152,6 @@ struct CPUClass {
     ObjectClass *(*class_by_name)(const char *cpu_model);
     void (*parse_features)(const char *typename, char *str, Error **errp);
 
-    bool (*has_work)(CPUState *cpu);
     int (*mmu_index)(CPUState *cpu, bool ifetch);
     int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
                            uint8_t *buf, int len, bool is_write);
@@ -1156,6 +1154,7 @@ G_NORETURN void cpu_abort(CPUState *cpu, const char *fmt, ...)
 
 /* $(top_srcdir)/cpu.c */
 void cpu_class_init_props(DeviceClass *dc);
+void cpu_exec_class_post_init(CPUClass *cc);
 void cpu_exec_initfn(CPUState *cpu);
 void cpu_vmstate_register(CPUState *cpu);
 void cpu_vmstate_unregister(CPUState *cpu);