aboutsummaryrefslogtreecommitdiff
path: root/hw/cpu
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-04-15 08:56:55 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-04-25 12:48:12 +0200
commit259181d29f81aa72a489dddc7d59517894b51e0f (patch)
tree1995d1ab91d6f7771a1d561a9b66a6d2a010249d /hw/cpu
parentc1c350dc2ccbf92524754694547909e1455e4eef (diff)
downloadqemu-259181d29f81aa72a489dddc7d59517894b51e0f.zip
qemu-259181d29f81aa72a489dddc7d59517894b51e0f.tar.gz
qemu-259181d29f81aa72a489dddc7d59517894b51e0f.tar.bz2
hw: Add a Kconfig switch for the TYPE_CPU_CLUSTER device
The cpu-cluster device is only needed for some few arm and riscv machines. Let's avoid compiling and linking it if it is not really necessary. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240415065655.130099-3-thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/cpu')
-rw-r--r--hw/cpu/Kconfig3
-rw-r--r--hw/cpu/meson.build3
2 files changed, 5 insertions, 1 deletions
diff --git a/hw/cpu/Kconfig b/hw/cpu/Kconfig
index f776e88..baff478 100644
--- a/hw/cpu/Kconfig
+++ b/hw/cpu/Kconfig
@@ -12,3 +12,6 @@ config A15MPCORE
config ARM11MPCORE
bool
select ARM11SCU
+
+config CPU_CLUSTER
+ bool
diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build
index 38cdcfb..9d36bf8 100644
--- a/hw/cpu/meson.build
+++ b/hw/cpu/meson.build
@@ -1,4 +1,5 @@
-system_ss.add(files('core.c', 'cluster.c'))
+system_ss.add(files('core.c'))
+system_ss.add(when: 'CONFIG_CPU_CLUSTER', if_true: files('cluster.c'))
system_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))