mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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 <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #13102
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user