From 21cf32635e0ccd81c0bb3f5ec2425d2704f9de68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 25 Mar 2026 20:18:27 +0100 Subject: [PATCH] target/loongarch: Avoid target-specific migration headers in machine.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit machine.c doesn't use any target-specific macro defined by the "migration/cpu.h" header. Use the minimum header required: "migration/qemu-file-types.h" which is not target-specific. This allows to build this file as common object. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-Id: <20260325211728.89204-3-philmd@linaro.org> --- target/loongarch/machine.c | 2 +- target/loongarch/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c index 28b9079d04..4db53fec26 100644 --- a/target/loongarch/machine.c +++ b/target/loongarch/machine.c @@ -7,7 +7,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "migration/cpu.h" +#include "migration/vmstate.h" #include "system/tcg.h" #include "vec.h" diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build index 2ae96d6869..c5a2953b29 100644 --- a/target/loongarch/meson.build +++ b/target/loongarch/meson.build @@ -10,6 +10,7 @@ loongarch_user_ss.add(files('gdbstub.c')) loongarch_common_system_ss = ss.source_set() loongarch_common_system_ss.add(files('gdbstub.c')) +loongarch_common_system_ss.add(files('machine.c')) loongarch_system_ss = ss.source_set() loongarch_system_ss.add(files( @@ -17,7 +18,6 @@ loongarch_system_ss.add(files( 'cpu_helper.c', 'csr.c', 'loongarch-qmp-cmds.c', - 'machine.c', )) common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])