diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2021-04-23 10:34:44 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2022-03-10 01:16:35 +0300 |
commit | c20e1117d9aa22c558646a1060ddd1dd042fb107 (patch) | |
tree | 8df7aa15f8dadbd0a512387994f8eca95588c3fd /arch/xtensa/Kconfig | |
parent | 19c5699f9affbd6824f4db0e19fcdc9d609a5e6b (diff) | |
download | linux-c20e1117d9aa22c558646a1060ddd1dd042fb107.tar.xz |
xtensa: add kernel ABI selection to Kconfig
Add choice to use default or call0 ABI for the kernel code. If call0 ABI
is chosen add '-mabi=call0' to the flags. The toolchain support for this
option is rather new so only enable it when the compiler supports it.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/Kconfig')
-rw-r--r-- | arch/xtensa/Kconfig | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index b324f6743073..cf03ed54c8f0 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -92,6 +92,9 @@ config CPU_BIG_ENDIAN config CPU_LITTLE_ENDIAN def_bool !CPU_BIG_ENDIAN +config CC_HAVE_CALL0_ABI + def_bool $(success,test "$(shell,echo __XTENSA_CALL0_ABI__ | $(CC) -mabi=call0 -E -P - 2>/dev/null)" = 1) + menu "Processor type and features" choice @@ -250,6 +253,38 @@ config FAST_SYSCALL_SPILL_REGISTERS If unsure, say N. +choice + prompt "Kernel ABI" + default KERNEL_ABI_DEFAULT + help + Select ABI for the kernel code. This ABI is independent of the + supported userspace ABI and any combination of the + kernel/userspace ABI is possible and should work. + + In case both kernel and userspace support only call0 ABI + all register windows support code will be omitted from the + build. + + If unsure, choose the default ABI. + +config KERNEL_ABI_DEFAULT + bool "Default ABI" + help + Select this option to compile kernel code with the default ABI + selected for the toolchain. + Normally cores with windowed registers option use windowed ABI and + cores without it use call0 ABI. + +config KERNEL_ABI_CALL0 + bool "Call0 ABI" if CC_HAVE_CALL0_ABI + help + Select this option to compile kernel code with call0 ABI even with + toolchain that defaults to windowed ABI. + When this option is not selected the default toolchain ABI will + be used for the kernel code. + +endchoice + config USER_ABI_CALL0 bool |