aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi/common/include')
-rw-r--r--sys/compat/linuxkpi/common/include/asm/fpu/api.h40
-rw-r--r--sys/compat/linuxkpi/common/include/linux/sched.h3
2 files changed, 8 insertions, 35 deletions
diff --git a/sys/compat/linuxkpi/common/include/asm/fpu/api.h b/sys/compat/linuxkpi/common/include/asm/fpu/api.h
index 035ec3620fdd..9c63b2e972bf 100644
--- a/sys/compat/linuxkpi/common/include/asm/fpu/api.h
+++ b/sys/compat/linuxkpi/common/include/asm/fpu/api.h
@@ -28,41 +28,13 @@
#ifndef _FPU_API_H_
#define _FPU_API_H_
-#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
+#define kernel_fpu_begin() \
+ lkpi_kernel_fpu_begin()
-#include <machine/fpu.h>
+#define kernel_fpu_end() \
+ lkpi_kernel_fpu_end()
-extern struct fpu_kern_ctx *__lkpi_fpu_ctx;
-extern unsigned int __lkpi_fpu_ctx_level;
-
-static inline void
-kernel_fpu_begin()
-{
- if (__lkpi_fpu_ctx_level++ == 0) {
- fpu_kern_enter(curthread, __lkpi_fpu_ctx, FPU_KERN_NORMAL);
- }
-}
-
-static inline void
-kernel_fpu_end()
-{
- if (--__lkpi_fpu_ctx_level == 0) {
- fpu_kern_leave(curthread, __lkpi_fpu_ctx);
- }
-}
-
-#else
-
-static inline void
-kernel_fpu_begin()
-{
-}
-
-static inline void
-kernel_fpu_end()
-{
-}
-
-#endif
+extern void lkpi_kernel_fpu_begin(void);
+extern void lkpi_kernel_fpu_end(void);
#endif /* _FPU_API_H_ */
diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h
index 937e9f27870c..5954b16f6496 100644
--- a/sys/compat/linuxkpi/common/include/linux/sched.h
+++ b/sys/compat/linuxkpi/common/include/linux/sched.h
@@ -82,7 +82,8 @@ struct task_struct {
int bsd_interrupt_value;
struct work_struct *work; /* current work struct, if set */
struct task_struct *group_leader;
- unsigned rcu_section[TS_RCU_TYPE_MAX];
+ unsigned rcu_section[TS_RCU_TYPE_MAX];
+ unsigned int fpu_ctx_level;
};
#define current ({ \