summaryrefslogtreecommitdiffstats
path: root/arch/s390/Kconfig
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-04-25 13:42:11 +0200
committerAlexander Gordeev <agordeev@linux.ibm.com>2023-05-15 14:12:14 +0200
commitfbac266f095de92b93e7c91c71cdca432c2c9275 (patch)
tree75c1f682e65031c03532b880eab1cab559afba82 /arch/s390/Kconfig
parent1f2597cd3686955a4d64e01909dbfe625a2a35a1 (diff)
downloadlinux-stable-fbac266f095de92b93e7c91c71cdca432c2c9275.tar.gz
linux-stable-fbac266f095de92b93e7c91c71cdca432c2c9275.tar.bz2
linux-stable-fbac266f095de92b93e7c91c71cdca432c2c9275.zip
s390: select ARCH_SUPPORTS_INT128
s390 has instructions to support 128 bit arithmetics, e.g. a 64 bit multiply instruction with a 128 bit result. Also 128 bit integer artithmetics are already used in s390 specific architecture code (see e.g. read_persistent_clock64()). Therefore select ARCH_SUPPORTS_INT128. However limit this to clang for now, since gcc generates inefficient code, which may lead to stack overflows, when compiling lib/crypto/curve25519-hacl64.c which depends on ARCH_SUPPORTS_INT128. The gcc generated functions have 6kb stack frames, compared to only 1kb of the code generated with clang. If the kernel is compiled with -Os library calls for __ashlti3(), __ashrti3(), and __lshrti3() may be generated. Similar to arm64 and riscv provide assembler implementations for these functions. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/Kconfig')
-rw-r--r--arch/s390/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index db20c1589a98..0c1bfac08e05 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -117,6 +117,7 @@ config S390
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_DEBUG_PAGEALLOC
select ARCH_SUPPORTS_HUGETLBFS
+ select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && CC_IS_CLANG
select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_SUPPORTS_PER_VMA_LOCK
select ARCH_USE_BUILTIN_BSWAP