From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit e0220bb5b2 made cpus.c target-agnostic but didn't notice
the cpu_list() function is only defined in target-specific code
in "cpu.h". Extract list_cpus() from the generic cpus.c into a
new target-specific unit.
Fixes: e0220bb5b2 ("softmmu: Build target-agnostic objects once")
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
softmmu/cpus.c | 8 --------
softmmu/cpus_list.c | 36 ++++++++++++++++++++++++++++++++++++
softmmu/meson.build | 1 +
3 files changed, 37 insertions(+), 8 deletions(-)
create mode 100644 softmmu/cpus_list.c
diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index e1d84c8ccb..7b75bb66d5 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -728,14 +728,6 @@ int vm_stop_force_state(RunState state)
}
}
-void list_cpus(const char *optarg)
-{
- /* XXX: implement xxx_cpu_list for targets that still miss it */
-#if defined(cpu_list)
- cpu_list();
-#endif
-}
-
void qmp_memsave(int64_t addr, int64_t size, const char *filename,
bool has_cpu, int64_t cpu_index, Error **errp)
{
diff --git a/softmmu/cpus_list.c b/softmmu/cpus_list.c
new file mode 100644
index 0000000000..59ef604423
--- /dev/null
+++ b/softmmu/cpus_list.c