target/loongarch: Avoid target-specific migration headers in machine.c

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é <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260325211728.89204-3-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé
2026-03-25 20:18:27 +01:00
parent 62d04afa68
commit 21cf32635e
2 changed files with 2 additions and 2 deletions

View File

@@ -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"

View File

@@ -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])