Skip to content

Commit 82f0f44

Browse files
committed
target/sparc: 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 644a811 commit 82f0f44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

target/sparc/cpu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,11 +777,13 @@ static void sparc_restore_state_to_opc(CPUState *cs,
777777
}
778778
}
779779

780+
#ifndef CONFIG_USER_ONLY
780781
static bool sparc_cpu_has_work(CPUState *cs)
781782
{
782783
return (cs->interrupt_request & CPU_INTERRUPT_HARD) &&
783784
cpu_interrupts_enabled(cpu_env(cs));
784785
}
786+
#endif /* !CONFIG_USER_ONLY */
785787

786788
static int sparc_cpu_mmu_index(CPUState *cs, bool ifetch)
787789
{
@@ -988,6 +990,7 @@ static const Property sparc_cpu_properties[] = {
988990
#include "hw/core/sysemu-cpu-ops.h"
989991

990992
static const struct SysemuCPUOps sparc_sysemu_ops = {
993+
.has_work = sparc_cpu_has_work,
991994
.get_phys_page_debug = sparc_cpu_get_phys_page_debug,
992995
.legacy_vmsd = &vmstate_sparc_cpu,
993996
};
@@ -1029,7 +1032,6 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data)
10291032

10301033
cc->class_by_name = sparc_cpu_class_by_name;
10311034
cc->parse_features = sparc_cpu_parse_features;
1032-
cc->has_work = sparc_cpu_has_work;
10331035
cc->mmu_index = sparc_cpu_mmu_index;
10341036
cc->dump_state = sparc_cpu_dump_state;
10351037
#if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY)

0 commit comments

Comments
 (0)