kconfig: clean CPU features and define only once
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
a372eaedcc
commit
9c1da0dfa6
4 changed files with 45 additions and 116 deletions
43
arch/Kconfig
43
arch/Kconfig
|
@ -191,6 +191,49 @@ config BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
|
||||||
This option signifies that the target has options of bootloaders
|
This option signifies that the target has options of bootloaders
|
||||||
that support context restore upon resume from deep sleep
|
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
|
# End hidden PM feature configs
|
||||||
#
|
#
|
||||||
|
|
|
@ -24,21 +24,6 @@ config ARCH_DEFCONFIG
|
||||||
string
|
string
|
||||||
default "arch/arc/defconfig"
|
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"
|
menu "ARC EM4 processor options"
|
||||||
|
|
||||||
config CPU_ARCEM4
|
config CPU_ARCEM4
|
||||||
|
@ -153,31 +138,6 @@ config CODE_DENSITY
|
||||||
help
|
help
|
||||||
Enable code density option to get better code density
|
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"
|
menu "ARC MPU Options"
|
||||||
depends on CPU_HAS_MPU
|
depends on CPU_HAS_MPU
|
||||||
|
|
||||||
|
|
|
@ -34,21 +34,6 @@ config CPU_HAS_SYSTICK
|
||||||
help
|
help
|
||||||
This option is enabled when the CPU has systick timer implemented.
|
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
|
config ARM_STACK_PROTECTION
|
||||||
bool
|
bool
|
||||||
default y if HW_STACK_PROTECTION
|
default y if HW_STACK_PROTECTION
|
||||||
|
@ -65,29 +50,9 @@ config ARM_USERSPACE
|
||||||
user-level threads that are protected from each other and from
|
user-level threads that are protected from each other and from
|
||||||
crashing the kernel.
|
crashing the kernel.
|
||||||
|
|
||||||
menu "Floating Point Options"
|
menu "Architectue Floating Point Options"
|
||||||
depends on CPU_HAS_FPU
|
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
|
choice
|
||||||
prompt "Floating point ABI"
|
prompt "Floating point ABI"
|
||||||
default FP_HARDABI
|
default FP_HARDABI
|
||||||
|
|
|
@ -46,17 +46,6 @@ config CPU_MINUTEIA
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
This option signifies the use of a CPU from the Minute IA family.
|
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"
|
menu "Processor Capabilities"
|
||||||
|
|
||||||
|
@ -128,37 +117,9 @@ config X86_USERSPACE
|
||||||
supporting user-level threads that are protected from each other and
|
supporting user-level threads that are protected from each other and
|
||||||
from crashing the kernel.
|
from crashing the kernel.
|
||||||
|
|
||||||
menu "Floating Point Options"
|
menu "Architecture Floating Point Options"
|
||||||
depends on CPU_HAS_FPU
|
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
|
config SSE
|
||||||
bool
|
bool
|
||||||
prompt "SSE registers"
|
prompt "SSE registers"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue