kconfig: clean CPU features and define only once

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2017-11-23 17:43:54 -05:00 committed by Anas Nashif
commit 9c1da0dfa6
4 changed files with 45 additions and 116 deletions

View file

@ -191,6 +191,49 @@ config BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
This option signifies that the target has options of bootloaders
that support context restore upon resume from deep sleep
# End hidden CPU family configs
#
config CPU_HAS_FPU
bool
default n
help
This option is enabled when the CPU has hardware floating point
unit.
config CPU_HAS_MPU
bool
# Omit prompt to signify "hidden" option
default n
help
This option is enabled when the CPU has a Memory Protection Unit (MPU).
menu "Floating Point Options"
depends on CPU_HAS_FPU
config FLOAT
bool
prompt "Floating point registers"
default n
help
This option allows threads to use the floating point registers.
By default, only a single thread may use the registers.
Disabling this option means that any thread that uses a
floating point register will get a fatal exception.
config FP_SHARING
bool
prompt "Floating point register sharing"
depends on FLOAT
default n
help
This option allows multiple threads to use the floating point
registers.
endmenu
#
# End hidden PM feature configs
#

View file

@ -24,21 +24,6 @@ config ARCH_DEFCONFIG
string
default "arch/arc/defconfig"
config CPU_HAS_MPU
bool
# Omit prompt to signify "hidden" option
default n
help
This option is enabled when the CPU has a Memory Protection Unit (MPU).
config CPU_HAS_FPU
# Hidden config selected by CPU family
bool
default n
help
This option is enabled when the CPU has hardware floating point
unit.
menu "ARC EM4 processor options"
config CPU_ARCEM4
@ -153,31 +138,6 @@ config CODE_DENSITY
help
Enable code density option to get better code density
menu "Floating Point Options"
depends on CPU_HAS_FPU
config FLOAT
bool
prompt "Floating point registers"
default n
help
This option allows threads to use the floating point registers.
By default, only a single thread may use the registers.
Disabling this option means that any thread that uses a
floating point register will get a fatal exception.
config FP_SHARING
bool
prompt "Floating point register sharing"
depends on FLOAT
default n
help
This option allows multiple threads to use the floating point
registers.
endmenu
menu "ARC MPU Options"
depends on CPU_HAS_MPU

View file

@ -34,21 +34,6 @@ config CPU_HAS_SYSTICK
help
This option is enabled when the CPU has systick timer implemented.
config CPU_HAS_MPU
bool
# Omit prompt to signify "hidden" option
default n
help
This option is enabled when the CPU has a Memory Protection Unit (MPU).
config CPU_HAS_FPU
# Hidden config selected by CPU family
bool
default n
help
This option is enabled when the CPU has a hardware floating point
unit.
config ARM_STACK_PROTECTION
bool
default y if HW_STACK_PROTECTION
@ -65,29 +50,9 @@ config ARM_USERSPACE
user-level threads that are protected from each other and from
crashing the kernel.
menu "Floating Point Options"
menu "Architectue Floating Point Options"
depends on CPU_HAS_FPU
config FLOAT
bool
prompt "Floating point registers"
default n
help
This option allows threads to use the floating point registers.
By default, only a single thread may use the registers.
Disabling this option means that any thread that uses a
floating point register will get a fatal exception.
config FP_SHARING
bool
prompt "Floating point register sharing"
depends on FLOAT
default n
help
This option allows multiple threads to use the floating point
registers.
choice
prompt "Floating point ABI"
default FP_HARDABI

View file

@ -46,17 +46,6 @@ config CPU_MINUTEIA
bool
help
This option signifies the use of a CPU from the Minute IA family.
#
# End hidden CPU family configs
#
config CPU_HAS_FPU
# Hidden config selected by CPU family
bool
default n
help
This option is enabled when the CPU has hardware floating point
unit.
menu "Processor Capabilities"
@ -128,37 +117,9 @@ config X86_USERSPACE
supporting user-level threads that are protected from each other and
from crashing the kernel.
menu "Floating Point Options"
menu "Architecture Floating Point Options"
depends on CPU_HAS_FPU
config FLOAT
bool
prompt "Floating point registers"
default n
help
This option allows threads to use the x87 FPU/MMX registers. The
registers may be used by any number of cooperative threads or by
a single preemptible thread, but not both, since the kernel does not
preserve FPU context information when switching between threads.
Additional options must be enabled to permit the use of SSE registers or
to permit floating point register use by multiple preemptible threads.
Disabling this option means that any thread that uses the floating
point registers will get a fatal exception.
config FP_SHARING
bool
prompt "Floating point register sharing"
depends on FLOAT
default n
help
This option allows multiple preemptible threads to use the floating
point registers. Any preemptible thread that uses the registers must
provide stack space where the kernel can save FPU context info during
a preemptive context switch. A thread that uses only the x87 FPU/MMX
registers must provide 108 bytes of added stack space, while a thread
the uses the SSE registers must provide 464 bytes of added stack space.
config SSE
bool
prompt "SSE registers"