Skip to content

Commit 4a119cf

Browse files
committed
target/m68k: Move has_work() from CPUClass to SysemuCPUOps
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
1 parent 87969d6 commit 4a119cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

target/m68k/cpu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ static void m68k_restore_state_to_opc(CPUState *cs,
5151
}
5252
}
5353

54+
#ifndef CONFIG_USER_ONLY
5455
static bool m68k_cpu_has_work(CPUState *cs)
5556
{
5657
return cs->interrupt_request & CPU_INTERRUPT_HARD;
5758
}
59+
#endif /* !CONFIG_USER_ONLY */
5860

5961
static int m68k_cpu_mmu_index(CPUState *cs, bool ifetch)
6062
{
@@ -579,6 +581,7 @@ static const VMStateDescription vmstate_m68k_cpu = {
579581
#include "hw/core/sysemu-cpu-ops.h"
580582

581583
static const struct SysemuCPUOps m68k_sysemu_ops = {
584+
.has_work = m68k_cpu_has_work,
582585
.get_phys_page_debug = m68k_cpu_get_phys_page_debug,
583586
};
584587
#endif /* !CONFIG_USER_ONLY */
@@ -612,7 +615,6 @@ static void m68k_cpu_class_init(ObjectClass *c, void *data)
612615
&mcc->parent_phases);
613616

614617
cc->class_by_name = m68k_cpu_class_by_name;
615-
cc->has_work = m68k_cpu_has_work;
616618
cc->mmu_index = m68k_cpu_mmu_index;
617619
cc->dump_state = m68k_cpu_dump_state;
618620
cc->set_pc = m68k_cpu_set_pc;

0 commit comments

Comments
 (0)