Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154720027
D39448.id119945.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1019 B
Referenced Files
None
Subscribers
None
D39448.id119945.diff
View Options
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_aarch64.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_aarch64.h
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_aarch64.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_aarch64.h
@@ -44,13 +44,23 @@
#define _FREEBSD_SIMD_AARCH64_H
#include <sys/types.h>
+#include <sys/ucontext.h>
#include <machine/elf.h>
+#include <machine/fpu.h>
#include <machine/md_var.h>
+#include <machine/pcb.h>
#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
-#define kfpu_begin() do {} while (0)
-#define kfpu_end() do {} while (0)
+#define kfpu_begin() do { \
+ if (__predict_false(!is_fpu_kern_thread(0))) \
+ fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); \
+} while (0)
+
+#define kfpu_end() do { \
+ if (__predict_false(curthread->td_pcb->pcb_fpflags & PCB_FP_NOSAVE)) \
+ fpu_kern_leave(curthread, NULL); \
+} while (0)
#define kfpu_init() (0)
#define kfpu_fini() do {} while (0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 30, 7:28 AM (18 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32471592
Default Alt Text
D39448.id119945.diff (1019 B)
Attached To
Mode
D39448: openzfs: arm64: implement kfpu_begin/kfpu_end
Attached
Detach File
Event Timeline
Log In to Comment