aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-09-23 11:09:48 -0700
committerGitHub <[email protected]>2020-09-23 11:09:48 -0700
commit3dad29fb4b085a159d26e2322dc07b46950ff72e (patch)
tree1d1237cce60d17c6367ffb009def03a0b81d7043 /module
parenteb267f08cf52fb5f31c6c671bfc0f2cfbf6d0c06 (diff)
FreeBSD: Don't save user FPU context in kernel threads
Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10899
Diffstat (limited to 'module')
-rw-r--r--module/os/freebsd/spl/spl_taskq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/freebsd/spl/spl_taskq.c b/module/os/freebsd/spl/spl_taskq.c
index 049e889cf..cc025de95 100644
--- a/module/os/freebsd/spl/spl_taskq.c
+++ b/module/os/freebsd/spl/spl_taskq.c
@@ -169,6 +169,10 @@ taskq_tsd_set(void *context)
{
taskq_t *tq = context;
+#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+ if (context != NULL && tsd_get(taskq_tsd) == NULL)
+ fpu_kern_thread(FPU_KERN_NORMAL);
+#endif
tsd_set(taskq_tsd, tq);
}