Skip to content

Commit 7ceab0b

Browse files
committed
platform: simplify setting CORE_COUNT and MAX_CORE_COUNT
All normal SOF builds use Zephyr build system, so common settings like system core count can be simply set based on Zephyr build options. There are a few speciality builds left to build SOF without Zephyr. Testbench, cmocka and the SOF ALSA plugin are a few such examples. To keep these builds functional, add a simple definition of key Zephyr definitions (like in this case MP_MAX_NUM_CPUS) to allow these builds to use common build rules even when Zephyr definitions are not available. The old arch/host/Kconfig is removed. It is no longer needed and caused confusion as it added a unconditional default to CORE_COUNT that was used (more or less unintentionally) by some of the speciality build targets. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent a86f371 commit 7ceab0b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/arch/host/Kconfig

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/platform/Kconfig

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -332,21 +332,30 @@ config MT8196
332332

333333
endchoice
334334

335-
config MAX_CORE_COUNT
335+
#
336+
# For non-Zephyr builds like testbench, cmocka and SOF ALSA plugin,
337+
# set core count separately.
338+
#
339+
if !ZEPHYR_SOF_MODULE
340+
341+
config MP_MAX_NUM_CPUS
336342
int
337-
default 5 if LUNARLAKE || PANTHERLAKE
338-
default 4 if TIGERLAKE || NOVALAKE
339-
default 3 if METEORLAKE
340-
default 3 if WILDCATLAKE
341343
default 1
342344
help
343345
Maximum number of cores per configuration
344346

347+
endif # !ZEPHYR_SOF_MODULE
348+
349+
config MAX_CORE_COUNT
350+
int
351+
default MP_MAX_NUM_CPUS
352+
help
353+
Maximum number of cores per configuration
354+
345355
config CORE_COUNT
346356
int "Number of cores"
347-
default MP_MAX_NUM_CPUS if KERNEL_BIN_NAME = "zephyr"
348-
default MAX_CORE_COUNT
349-
range 1 MAX_CORE_COUNT
357+
default MP_MAX_NUM_CPUS
358+
range 1 MP_MAX_NUM_CPUS
350359
help
351360
Number of used cores
352361
Lowering available core count could result in lower power consumption

0 commit comments

Comments
 (0)