glibc/sysdeps
Wilco Dijkstra 2e94e2f5d2 AArch64: Check kernel version for SVE ifuncs
Old Linux kernels disable SVE after every system call.  Calling the
SVE-optimized memcpy afterwards will then cause a trap to reenable SVE.
As a result, applications with a high use of syscalls may run slower with
the SVE memcpy.  This is true for kernels between 4.15.0 and before 6.2.0,
except for 5.14.0 which was patched.  Avoid this by checking the kernel
version and selecting the SVE ifunc on modern kernels.

Parse the kernel version reported by uname() into a 24-bit kernel.major.minor
value without calling any library functions.  If uname() is not supported or
if the version format is not recognized, assume the kernel is modern.

Tested-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2024-03-21 16:50:51 +00:00
..
aarch64 AArch64: Check kernel version for SVE ifuncs 2024-03-21 16:50:51 +00:00
alpha string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arc string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arm elf: Enable TLS descriptor tests on aarch64 2024-03-19 14:53:30 -03:00
csky Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
generic powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture. 2024-03-19 17:19:27 -05:00
gnu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hppa Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
htl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386 x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers 2024-02-28 09:02:56 -08:00
ieee754 Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
loongarch LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf 2024-03-12 14:07:27 +08:00
m68k string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
mach Implement setcontext/getcontext/makecontext/swapcontext for Hurd x86_64 2024-02-17 21:45:35 +01:00
microblaze Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
mips math: Update mips64 ulps 2024-02-22 21:28:25 +01:00
nios2 Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
or1k Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
posix Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
powerpc powerpc: Placeholder and infrastructure/build support to add Power11 related changes. 2024-03-19 21:11:34 -05:00
pthread Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
riscv riscv: Update nofpu libm test ulps 2024-03-18 11:28:50 +01:00
s390 s390: Improve static-pie configure tests 2024-02-28 10:09:53 -03:00
sh Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
sparc sparc: Treat the version field in the FPU control word as reserved 2024-02-19 10:55:50 -03:00
unix AArch64: Check kernel version for SVE ifuncs 2024-03-21 16:50:51 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 x86-64: Allocate state buffer space for RDI, RSI and RBX 2024-03-18 19:45:13 -07:00
x86_64 Add tst-gnu2-tls2mod1 to test-internal-extras 2024-03-19 14:28:28 +01:00