Skip to content

Commit 2d7efdc

Browse files
behlendorfandrewc12
authored andcommitted
Linux 5.19 compat: asm/fpu/internal.h
As of the Linux 5.19 kernel the asm/fpu/internal.h header was entirely removed. It has been effectively empty since the 5.16 kernel and provides no required functionality. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#13529
1 parent 14670ab commit 2d7efdc

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

config/kernel-fpu.m4

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ dnl #
22
dnl # Handle differences in kernel FPU code.
33
dnl #
44
dnl # Kernel
5+
dnl # 5.19: The asm/fpu/internal.h header was removed, it has been
6+
dnl # effectively empty since the 5.16 kernel.
7+
dnl #
58
dnl # 5.11: kernel_fpu_begin() is an inlined function now, so don't check
69
dnl # for it inside the kernel symbols.
710
dnl #
@@ -27,18 +30,32 @@ AC_DEFUN([ZFS_AC_KERNEL_FPU_HEADER], [
2730
],[
2831
AC_DEFINE(HAVE_KERNEL_FPU_API_HEADER, 1,
2932
[kernel has asm/fpu/api.h])
30-
AC_MSG_RESULT(asm/fpu/api.h)
33+
34+
ZFS_LINUX_TRY_COMPILE([
35+
#include <linux/module.h>
36+
#include <asm/fpu/internal.h>
37+
],[
38+
],[
39+
AC_DEFINE(HAVE_KERNEL_FPU_INTERNAL_HEADER, 1,
40+
[kernel has asm/fpu/internal.h])
41+
AC_MSG_RESULT([asm/fpu/api.h asm/fpu/internal.h])
42+
],[
43+
AC_MSG_RESULT([asm/fpu/api.h])
44+
])
3145
],[
32-
AC_MSG_RESULT(i387.h)
46+
AC_MSG_RESULT([i387.h])
3347
])
48+
3449
])
3550

3651
AC_DEFUN([ZFS_AC_KERNEL_SRC_FPU], [
3752
ZFS_LINUX_TEST_SRC([kernel_fpu], [
3853
#include <linux/types.h>
3954
#ifdef HAVE_KERNEL_FPU_API_HEADER
4055
#include <asm/fpu/api.h>
56+
#ifdef HAVE_KERNEL_FPU_INTERNAL_HEADER
4157
#include <asm/fpu/internal.h>
58+
#endif
4259
#else
4360
#include <asm/i387.h>
4461
#endif
@@ -51,7 +68,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FPU], [
5168
#include <linux/types.h>
5269
#ifdef HAVE_KERNEL_FPU_API_HEADER
5370
#include <asm/fpu/api.h>
71+
#ifdef HAVE_KERNEL_FPU_INTERNAL_HEADER
5472
#include <asm/fpu/internal.h>
73+
#endif
5574
#else
5675
#include <asm/i387.h>
5776
#endif

include/os/linux/kernel/linux/simd_x86.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@
9393

9494
#if defined(HAVE_KERNEL_FPU_API_HEADER)
9595
#include <asm/fpu/api.h>
96+
#if defined(HAVE_KERNEL_FPU_INTERNAL_HEADER)
9697
#include <asm/fpu/internal.h>
98+
#endif
9799
#else
98100
#include <asm/i387.h>
99101
#endif

0 commit comments

Comments
 (0)