From 259181d29f81aa72a489dddc7d59517894b51e0f Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 15 Apr 2024 08:56:55 +0200 Subject: hw: Add a Kconfig switch for the TYPE_CPU_CLUSTER device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Signed-off-by: Thomas Huth Message-ID: <20240415065655.130099-3-thuth@redhat.com> Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/cpu/Kconfig | 3 +++ hw/cpu/meson.build | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'hw/cpu') 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')) -- cgit v1.1