summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAttila Fülöp <attila@fueloep.org>2022-02-24 18:23:41 +0100
committerGitHub <noreply@github.com>2022-02-24 09:23:41 -0800
commit4d14a285b341b7031c0d23b7dd6b5ad63de8f0d4 (patch)
tree4d91983c265c6957c0c8b7f89447f928e8d23f18
parent361a7e821178e105c8e1206ead4479de83c2a617 (diff)
Linux 5.11 compat: x86 SIMD: fix kernel_fpu_{begin,end}() detection
Linux 5.11 changed kernel_fpu_begin() to an inlined function and moved the functionality to kernel_fpu_begin_mask(). This breaks the existing detection mechanism since it checks if kernel_fpu_begin is an exported kernel symbol, which isn't the case for an inlined function. To avoid assumptions about internal implementation, replace ZFS_LINUX_TEST_RESULT_SYMBOL in favor of ZFS_LINUX_TEST_RESULT which already makes sure kernel_fpu_{begin,end}() is usable by us. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Attila Fülöp <attila@fueloep.org> Closes #13147
-rw-r--r--config/kernel-fpu.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/config/kernel-fpu.m4 b/config/kernel-fpu.m4
index 06280239d..7f8b028d0 100644
--- a/config/kernel-fpu.m4
+++ b/config/kernel-fpu.m4
@@ -8,6 +8,9 @@ dnl #
dnl # XSTATE_XSAVE and XSTATE_XRESTORE aren't accessible any more
dnl # HAVE_KERNEL_FPU_XSAVE_INTERNAL
dnl #
+dnl # 5.11: kernel_fpu_begin() is an inlined function now, so don't check
+dnl # for it inside the kernel symbols.
+dnl #
dnl # 5.0: Wrappers have been introduced to save/restore the FPU state.
dnl # This change was made to the 4.19.38 and 4.14.120 LTS kernels.
dnl # HAVE_KERNEL_FPU_INTERNAL
@@ -147,8 +150,7 @@ AC_DEFUN([ZFS_AC_KERNEL_FPU], [
dnl # Legacy kernel
dnl #
AC_MSG_CHECKING([whether kernel fpu is available])
- ZFS_LINUX_TEST_RESULT_SYMBOL([kernel_fpu_license],
- [kernel_fpu_begin], [arch/x86/kernel/fpu/core.c], [
+ ZFS_LINUX_TEST_RESULT([kernel_fpu_license], [
AC_MSG_RESULT(kernel_fpu_*)
AC_DEFINE(HAVE_KERNEL_FPU, 1,
[kernel has kernel_fpu_* functions])