Kconfig: clean up FPU and FPU_SHARING entries
CONFIG_FPU: The architecture dependency list is redundant. Having CPU_HAS_FPU being selected by those archs as a dependency is sufficient and cleaner. CONFIG_FPU_SHARING: The default should always be y to be on the safe side here, but as a compromise for not affecting existing config, let's move the default selection local to those configs that care, again to avoid a growing list of conditionals here. Adjust the help text which applies to more than just Cortex-M. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
9136c40833
commit
949ef7c660
2 changed files with 9 additions and 10 deletions
18
arch/Kconfig
18
arch/Kconfig
|
@ -830,7 +830,6 @@ menu "Floating Point Options"
|
|||
config FPU
|
||||
bool "Enable floating point unit (FPU)"
|
||||
depends on CPU_HAS_FPU
|
||||
depends on ARC || ARM || RISCV || SPARC || X86
|
||||
help
|
||||
This option enables the hardware Floating Point Unit (FPU), in order to
|
||||
support using the floating point registers and instructions.
|
||||
|
@ -851,20 +850,19 @@ config FPU
|
|||
config FPU_SHARING
|
||||
bool "FPU register sharing"
|
||||
depends on FPU && MULTITHREADING
|
||||
default y if ARM && ARMV7_M_ARMV8_M_FP
|
||||
help
|
||||
This option enables preservation of the hardware floating point registers
|
||||
across context switches to allow multiple threads to perform concurrent
|
||||
floating point operations.
|
||||
|
||||
Note that on Cortex-M processors with the floating point extension we
|
||||
enable by default the FPU register sharing mode, as some GCC compilers
|
||||
may activate a floating point context by generating FP instructions for
|
||||
any thread, and that context must be preserved when switching such
|
||||
threads in and out. The developers can still disable the FP sharing
|
||||
mode in their application projects, and switch to Unshared FP registers
|
||||
mode, if it is guaranteed that the image code does not generate FP
|
||||
instructions outside the single thread context that is allowed to do so.
|
||||
Note that some compiler configurations may activate a floating point
|
||||
context by generating FP instructions for any thread, and that
|
||||
context must be preserved when switching such threads in and out.
|
||||
The developers can still disable the FP sharing mode in their
|
||||
application projects, and switch to Unshared FP registers mode,
|
||||
if it is guaranteed that the image code does not generate FP
|
||||
instructions outside the single thread context that is allowed
|
||||
to do so.
|
||||
|
||||
endmenu
|
||||
|
||||
|
|
|
@ -244,6 +244,7 @@ config ARMV8_M_SE
|
|||
config ARMV7_M_ARMV8_M_FP
|
||||
bool
|
||||
depends on ARMV7_M_ARMV8_M_MAINLINE && !CPU_CORTEX_M3
|
||||
imply FPU_SHARING
|
||||
help
|
||||
This option signifies the use of an ARMv7-M processor
|
||||
implementation, or the use of an ARMv8-M processor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue