aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2022-12-14 14:27:14 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-12-15 17:37:47 +0000
commit3d81e8cf0c81b8b63d7d7056c450dd94bfbfd038 (patch)
treeba4c2c21fac46b79d91fcb4a01caff88528d697c /target
parent990f49cfd700ff72933949769276dfa5a74ce36e (diff)
downloadqemu-3d81e8cf0c81b8b63d7d7056c450dd94bfbfd038.zip
qemu-3d81e8cf0c81b8b63d7d7056c450dd94bfbfd038.tar.gz
qemu-3d81e8cf0c81b8b63d7d7056c450dd94bfbfd038.tar.bz2
hw/misc: Move some arm-related files from specific_ss into softmmu_ss
The header target/arm/kvm-consts.h checks CONFIG_KVM which is marked as poisoned in common code, so the files that include this header have to be added to specific_ss and recompiled for each, qemu-system-arm and qemu-system-aarch64. However, since the kvm headers are only optionally used in kvm-constants.h for some sanity checks, we can additionally check the NEED_CPU_H macro first to avoid the poisoned CONFIG_KVM macro, so kvm-constants.h can also be used from "common" files (without the sanity checks - which should be OK since they are still done from other target-specific files instead). This way, and by adjusting some other include statements in the related files here and there, we can move some files from specific_ss into softmmu_ss, so that they only need to be compiled once during the build process. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20221202154023.293614-1-thuth@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/arm/kvm-consts.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/arm/kvm-consts.h b/target/arm/kvm-consts.h
index faacf96..09967ec 100644
--- a/target/arm/kvm-consts.h
+++ b/target/arm/kvm-consts.h
@@ -14,16 +14,16 @@
#ifndef ARM_KVM_CONSTS_H
#define ARM_KVM_CONSTS_H
+#ifdef NEED_CPU_H
#ifdef CONFIG_KVM
#include <linux/kvm.h>
#include <linux/psci.h>
-
#define MISMATCH_CHECK(X, Y) QEMU_BUILD_BUG_ON(X != Y)
+#endif
+#endif
-#else
-
+#ifndef MISMATCH_CHECK
#define MISMATCH_CHECK(X, Y) QEMU_BUILD_BUG_ON(0)
-
#endif
#define CP_REG_SIZE_SHIFT 52