mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
target/sparc: Replace target_monitor_defs -> SysemuCPUOps::monitor_defs
Restrict sparc64_monitor_defs[] to cpu.c, register it as SysemuCPUOps::monitor_defs hook (taking care to not register it on 32-bit SPARC target), allowing to remove the target_monitor_defs() method. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260427080738.77138-30-philmd@linaro.org>
This commit is contained in:
@@ -993,12 +993,31 @@ static const Property sparc_cpu_properties[] = {
|
||||
};
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
|
||||
#ifdef TARGET_SPARC64
|
||||
#include "monitor/hmp.h"
|
||||
|
||||
static const MonitorDef sparc64_monitor_defs[] = {
|
||||
{ "asi", offsetof(CPUSPARCState, asi) },
|
||||
{ "pstate", offsetof(CPUSPARCState, pstate) },
|
||||
{ "cansave", offsetof(CPUSPARCState, cansave) },
|
||||
{ "canrestore", offsetof(CPUSPARCState, canrestore) },
|
||||
{ "otherwin", offsetof(CPUSPARCState, otherwin) },
|
||||
{ "wstate", offsetof(CPUSPARCState, wstate) },
|
||||
{ "cleanwin", offsetof(CPUSPARCState, cleanwin) },
|
||||
{ NULL },
|
||||
};
|
||||
#endif
|
||||
|
||||
#include "hw/core/sysemu-cpu-ops.h"
|
||||
|
||||
static const struct SysemuCPUOps sparc_sysemu_ops = {
|
||||
.has_work = sparc_cpu_has_work,
|
||||
.get_phys_page_debug = sparc_cpu_get_phys_page_debug,
|
||||
.legacy_vmsd = &vmstate_sparc_cpu,
|
||||
#if defined(TARGET_SPARC64)
|
||||
.monitor_defs = sparc64_monitor_defs,
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,21 +37,3 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
|
||||
}
|
||||
dump_mmu(env1);
|
||||
}
|
||||
|
||||
const MonitorDef monitor_defs[] = {
|
||||
#ifdef TARGET_SPARC64
|
||||
{ "asi", offsetof(CPUSPARCState, asi) },
|
||||
{ "pstate", offsetof(CPUSPARCState, pstate) },
|
||||
{ "cansave", offsetof(CPUSPARCState, cansave) },
|
||||
{ "canrestore", offsetof(CPUSPARCState, canrestore) },
|
||||
{ "otherwin", offsetof(CPUSPARCState, otherwin) },
|
||||
{ "wstate", offsetof(CPUSPARCState, wstate) },
|
||||
{ "cleanwin", offsetof(CPUSPARCState, cleanwin) },
|
||||
#endif
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
const MonitorDef *target_monitor_defs(void)
|
||||
{
|
||||
return monitor_defs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user