Kconfig: Hide SMP and USE_SWITCH from unsupported platforms

Don't present USE_SWITCH and SMP to user applications that are
configuring for platforms that do not support SMP or USE_SWITCH.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2018-12-27 18:20:56 +01:00 committed by Anas Nashif
commit f42ed32dc5
2 changed files with 10 additions and 0 deletions

View file

@ -34,6 +34,7 @@ config XTENSA_OMIT_HIGH_INTERRUPTS
config XTENSA_ASM2 config XTENSA_ASM2
bool "New-style Xtensa context switch & interrupt layer" bool "New-style Xtensa context switch & interrupt layer"
select USE_SWITCH select USE_SWITCH
select USE_SWITCH_SUPPORTED
help help
This selects a new implementation of context switching and This selects a new implementation of context switching and
interrupt handling. Advantages are a much lower interrupt interrupt handling. Advantages are a much lower interrupt

View file

@ -650,8 +650,10 @@ config MAX_DOMAIN_PARTITIONS
Configure the maximum number of partitions per memory domain. Configure the maximum number of partitions per memory domain.
menu "SMP Options" menu "SMP Options"
config USE_SWITCH config USE_SWITCH
bool "Use new-style _arch_switch instead of __swap" bool "Use new-style _arch_switch instead of __swap"
depends on USE_SWITCH_SUPPORTED
help help
The _arch_switch() API is a lower level context switching The _arch_switch() API is a lower level context switching
primitive than the original __swap mechanism. It is required primitive than the original __swap mechanism. It is required
@ -660,6 +662,13 @@ config USE_SWITCH
architecture provides both, _arch_switch incurs more somewhat architecture provides both, _arch_switch incurs more somewhat
overhead and may be slower. overhead and may be slower.
config USE_SWITCH_SUPPORTED
bool
help
Indicates whether _arch_switch() API is supported by the
currently enabled platform. This option should be selected by
platforms that implement it.
config SMP config SMP
bool "Enable symmetric multithreading support" bool "Enable symmetric multithreading support"
depends on USE_SWITCH depends on USE_SWITCH