aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-21 13:04:11 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-09 17:00:47 +0100
commit6a2b2943145c1dcb44091afa993de6d01824190b (patch)
tree4eb07b98c02c0e4212edb0fcd44979913734dbba
parent85edafe385f538ce3a84ed478faea12e28ab1720 (diff)
downloadqemu-6a2b2943145c1dcb44091afa993de6d01824190b.zip
qemu-6a2b2943145c1dcb44091afa993de6d01824190b.tar.gz
qemu-6a2b2943145c1dcb44091afa993de6d01824190b.tar.bz2
target/openrisc: Move has_work() from CPUClass to SysemuCPUOps
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250125170125.32855-15-philmd@linaro.org>
-rw-r--r--target/openrisc/cpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index e8c357a..e8abf1f 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -63,11 +63,13 @@ static void openrisc_restore_state_to_opc(CPUState *cs,
}
}
+#ifndef CONFIG_USER_ONLY
static bool openrisc_cpu_has_work(CPUState *cs)
{
return cs->interrupt_request & (CPU_INTERRUPT_HARD |
CPU_INTERRUPT_TIMER);
}
+#endif /* !CONFIG_USER_ONLY */
static int openrisc_cpu_mmu_index(CPUState *cs, bool ifetch)
{
@@ -233,6 +235,7 @@ static void openrisc_any_initfn(Object *obj)
#include "hw/core/sysemu-cpu-ops.h"
static const struct SysemuCPUOps openrisc_sysemu_ops = {
+ .has_work = openrisc_cpu_has_work,
.get_phys_page_debug = openrisc_cpu_get_phys_page_debug,
};
#endif
@@ -266,7 +269,6 @@ static void openrisc_cpu_class_init(ObjectClass *oc, void *data)
&occ->parent_phases);
cc->class_by_name = openrisc_cpu_class_by_name;
- cc->has_work = openrisc_cpu_has_work;
cc->mmu_index = openrisc_cpu_mmu_index;
cc->dump_state = openrisc_cpu_dump_state;
cc->set_pc = openrisc_cpu_set_pc;