mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
kernel_fpu fixes
This patch fixes a few issues when detecting which kernel_fpu functions are available. - Use kernel_fpu_begin() if it's exported on newer kernels. - Use ZFS_LINUX_TRY_COMPILE_SYMBOL() to choose the right kernel_fpu function when using --enable-linux-builtin. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #8259 Closes #8363
This commit is contained in:
committed by
Brian Behlendorf
parent
a73e8fdb93
commit
becdcec7b9
@@ -81,9 +81,16 @@
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#if defined(HAVE_UNDERSCORE_KERNEL_FPU)
|
||||
|
||||
#if defined(HAVE_KERNEL_FPU_API_HEADER)
|
||||
#include <asm/fpu/api.h>
|
||||
#include <asm/fpu/internal.h>
|
||||
#else
|
||||
#include <asm/i387.h>
|
||||
#include <asm/xcr.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_UNDERSCORE_KERNEL_FPU)
|
||||
#define kfpu_begin() \
|
||||
{ \
|
||||
preempt_disable(); \
|
||||
@@ -95,8 +102,6 @@
|
||||
preempt_enable(); \
|
||||
}
|
||||
#elif defined(HAVE_KERNEL_FPU)
|
||||
#include <asm/i387.h>
|
||||
#include <asm/xcr.h>
|
||||
#define kfpu_begin() kernel_fpu_begin()
|
||||
#define kfpu_end() kernel_fpu_end()
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user