From 10fa254539ec41c6b043785d4e7ab34bce383b9f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 24 Oct 2019 10:17:33 -0700 Subject: Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contrary to initial testing we cannot rely on these kernels to invalidate the per-cpu FPU state and restore the FPU registers. Nor can we guarantee that the kernel won't modify the FPU state which we saved in the task struck. Therefore, the kfpu_begin() and kfpu_end() functions have been updated to save and restore the FPU state using our own dedicated per-cpu FPU state variables. This has the additional advantage of allowing us to use the FPU again in user threads. So we remove the code which was added to use task queues to ensure some functions ran in kernel threads. Reviewed-by: Fabian Grünbichler Reviewed-by: Tony Hutter Signed-off-by: Brian Behlendorf Issue #9346 Closes #9403 --- module/icp/algs/aes/aes_impl.c | 3 +-- module/icp/algs/modes/gcm.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'module/icp/algs') diff --git a/module/icp/algs/aes/aes_impl.c b/module/icp/algs/aes/aes_impl.c index d97e2e239..2c123b8f5 100644 --- a/module/icp/algs/aes/aes_impl.c +++ b/module/icp/algs/aes/aes_impl.c @@ -295,9 +295,8 @@ aes_impl_get_ops(void) /* * Initialize all supported implementations. */ -/* ARGSUSED */ void -aes_impl_init(void *arg) +aes_impl_init(void) { aes_impl_ops_t *curr_impl; int i, c; diff --git a/module/icp/algs/modes/gcm.c b/module/icp/algs/modes/gcm.c index 195a96df5..195939b85 100644 --- a/module/icp/algs/modes/gcm.c +++ b/module/icp/algs/modes/gcm.c @@ -703,9 +703,8 @@ gcm_impl_get_ops() /* * Initialize all supported implementations. */ -/* ARGSUSED */ void -gcm_impl_init(void *arg) +gcm_impl_init(void) { gcm_impl_ops_t *curr_impl; int i, c; -- cgit v1.2.3