View | Details | Raw Unified | Return to bug 250351
Collapse All | Expand All

(-)b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_x86.h (-9 / +2 lines)
Lines 40-54 Link Here
40
#define	kfpu_allowed()		1
40
#define	kfpu_allowed()		1
41
#define	kfpu_initialize(tsk)	do {} while (0)
41
#define	kfpu_initialize(tsk)	do {} while (0)
42
42
43
#define	kfpu_begin() {					\
43
#define	kfpu_begin()	fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX)
44
	if (__predict_false(!is_fpu_kern_thread(0)))		\
44
#define	kfpu_end()	fpu_kern_leave(curthread, NULL)
45
		fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX);\
46
}
47
48
#define	kfpu_end()	{			\
49
	if (__predict_false(curpcb->pcb_flags & PCB_FPUNOSAVE))	\
50
		fpu_kern_leave(curthread, NULL);	\
51
}
52
45
53
/*
46
/*
54
 * Check if OS supports AVX and AVX2 by checking XCR0
47
 * Check if OS supports AVX and AVX2 by checking XCR0

Return to bug 250351