From d3376f27814ea7924dca504be2a5f8b4f6e85100 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 25 Jan 2018 14:03:02 -0800 Subject: [PATCH] kernel, esp32: Add SMP kconfig flag and MP_NUM_CPUS variable Simply define the Kconfig variables in this patch so they can be used in later patches. Define MP_NUM_CPUS correctly on esp32. No code changes. Signed-off-by: Andy Ross --- arch/xtensa/soc/esp32/Kconfig.defconfig | 3 +++ kernel/Kconfig | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/arch/xtensa/soc/esp32/Kconfig.defconfig b/arch/xtensa/soc/esp32/Kconfig.defconfig index 8abd61861dd..2685e3e2891 100644 --- a/arch/xtensa/soc/esp32/Kconfig.defconfig +++ b/arch/xtensa/soc/esp32/Kconfig.defconfig @@ -15,4 +15,7 @@ config IRQ_OFFLOAD_INTNUM config XTENSA_ASM2 def_bool y +config MP_NUM_CPUS + default 2 + endif diff --git a/kernel/Kconfig b/kernel/Kconfig index c4ddef7d2c3..93e25d80d13 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -561,6 +561,22 @@ config USE_SWITCH architecture provides both, _arch_switch incurs more somewhat overhead and may be slower. +config SMP + bool + prompt "Enable symmetric multithreading support" + default n + help + When true, Zephyr will be build with SMP support, allowing + more than one CPU to schedule Zephyr tasks at a time. + +config MP_NUM_CPUS + int + prompt "Number of CPUs/cores" + default 1 + help + Number of multiprocessing-capable cores available to the + multicpu API and SMP features. + source "kernel/Kconfig.event_logger" source "kernel/Kconfig.power_mgmt"