diff options
author | Attila Fülöp <[email protected]> | 2022-03-09 01:19:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-08 16:19:15 -0800 |
commit | ce7a5dbf4b37a0ba28dd6911e1a17f039fdd4f4e (patch) | |
tree | 99b992ce09e28646db7470fd3b179d37e05c9fbc /module/zcommon/zfs_prop.c | |
parent | a86e089415679cf1b98eb424a159bb36aa2c19e3 (diff) |
Linux x86 SIMD: factor out unneeded kernel dependencies
Cleanup the kernel SIMD code by removing kernel dependencies.
- Replace XSTATE_XSAVE with our own XSAVE implementation for all
kernels not exporting kernel_fpu{begin,end}(), see #13059
- Replace union fpregs_state by a uint8_t * buffer and get the size
of the buffer from the hardware via the CPUID instruction
- Replace kernels xgetbv() by our own implementation which was
already there for userspace.
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Attila Fülöp <[email protected]>
Closes #13102
Diffstat (limited to 'module/zcommon/zfs_prop.c')
-rw-r--r-- | module/zcommon/zfs_prop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index 0d5735066..8b3e774d9 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -1001,10 +1001,10 @@ zfs_prop_align_right(zfs_prop_t prop) #include <sys/simd.h> -#if defined(HAVE_KERNEL_FPU_INTERNAL) || defined(HAVE_KERNEL_FPU_XSAVE_INTERNAL) -union fpregs_state **zfs_kfpu_fpregs; +#if defined(HAVE_KERNEL_FPU_INTERNAL) +uint8_t **zfs_kfpu_fpregs; EXPORT_SYMBOL(zfs_kfpu_fpregs); -#endif /* HAVE_KERNEL_FPU_INTERNAL || HAVE_KERNEL_FPU_XSAVE_INTERNAL */ +#endif /* defined(HAVE_KERNEL_FPU_INTERNAL) */ static int __init zcommon_init(void) |