diff options
author | Matthew Macy <[email protected]> | 2019-09-05 09:34:54 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-09-05 09:34:54 -0700 |
commit | 006e9a40882468be68f276c946bae812b74ac35c (patch) | |
tree | a4137660779e71e9da7e0a4dfb18c15951eb01f0 /module/icp | |
parent | d02186ee2b0570069cfbb0d08d5c52752648f388 (diff) |
OpenZFS restructuring - move platform specific headers
Move platform specific Linux headers under include/os/linux/.
Update the build system accordingly to detect the platform.
This lays some of the initial groundwork to supporting building
for other platforms.
As part of this change it was necessary to create both a user
and kernel space sys/simd.h header which can be included in
either context. No functional change, the source has been
refactored and the relevant #include's updated.
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Signed-off-by: Matthew Macy <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9198
Diffstat (limited to 'module/icp')
-rw-r--r-- | module/icp/algs/aes/aes_impl.c | 2 | ||||
-rw-r--r-- | module/icp/algs/aes/aes_impl_aesni.c | 3 | ||||
-rw-r--r-- | module/icp/algs/aes/aes_impl_x86-64.c | 2 | ||||
-rw-r--r-- | module/icp/algs/modes/gcm.c | 2 | ||||
-rw-r--r-- | module/icp/algs/modes/gcm_pclmulqdq.c | 4 | ||||
-rw-r--r-- | module/icp/io/aes.c | 4 |
6 files changed, 9 insertions, 8 deletions
diff --git a/module/icp/algs/aes/aes_impl.c b/module/icp/algs/aes/aes_impl.c index 0f11f9999..b60b16cc0 100644 --- a/module/icp/algs/aes/aes_impl.c +++ b/module/icp/algs/aes/aes_impl.c @@ -25,9 +25,9 @@ #include <sys/zfs_context.h> #include <sys/crypto/icp.h> #include <sys/crypto/spi.h> +#include <sys/simd.h> #include <modes/modes.h> #include <aes/aes_impl.h> -#include <linux/simd.h> /* * Initialize AES encryption and decryption key schedules. diff --git a/module/icp/algs/aes/aes_impl_aesni.c b/module/icp/algs/aes/aes_impl_aesni.c index 222c176aa..4b5eefd71 100644 --- a/module/icp/algs/aes/aes_impl_aesni.c +++ b/module/icp/algs/aes/aes_impl_aesni.c @@ -24,7 +24,8 @@ #if defined(__x86_64) && defined(HAVE_AES) -#include <linux/simd_x86.h> +#include <sys/simd.h> +#include <sys/types.h> /* These functions are used to execute AES-NI instructions: */ extern int rijndael_key_setup_enc_intel(uint32_t rk[], diff --git a/module/icp/algs/aes/aes_impl_x86-64.c b/module/icp/algs/aes/aes_impl_x86-64.c index b4515fa22..0ee7ee99c 100644 --- a/module/icp/algs/aes/aes_impl_x86-64.c +++ b/module/icp/algs/aes/aes_impl_x86-64.c @@ -24,7 +24,7 @@ #if defined(__x86_64) -#include <linux/simd_x86.h> +#include <sys/simd.h> /* These functions are used to execute amd64 instructions for AMD or Intel: */ extern int rijndael_key_setup_enc_amd64(uint32_t rk[], diff --git a/module/icp/algs/modes/gcm.c b/module/icp/algs/modes/gcm.c index 423b70e2c..1fb8e256a 100644 --- a/module/icp/algs/modes/gcm.c +++ b/module/icp/algs/modes/gcm.c @@ -28,8 +28,8 @@ #include <sys/crypto/icp.h> #include <sys/crypto/impl.h> #include <sys/byteorder.h> +#include <sys/simd.h> #include <modes/gcm_impl.h> -#include <linux/simd.h> #define GHASH(c, d, t, o) \ xor_block((uint8_t *)(d), (uint8_t *)(c)->gcm_ghash); \ diff --git a/module/icp/algs/modes/gcm_pclmulqdq.c b/module/icp/algs/modes/gcm_pclmulqdq.c index 8a43ba33a..05920115c 100644 --- a/module/icp/algs/modes/gcm_pclmulqdq.c +++ b/module/icp/algs/modes/gcm_pclmulqdq.c @@ -24,12 +24,12 @@ #if defined(__x86_64) && defined(HAVE_PCLMULQDQ) -#include <linux/simd_x86.h> +#include <sys/types.h> +#include <sys/simd.h> /* These functions are used to execute pclmulqdq based assembly methods */ extern void gcm_mul_pclmulqdq(uint64_t *, uint64_t *, uint64_t *); - #include <modes/gcm_impl.h> /* diff --git a/module/icp/io/aes.c b/module/icp/io/aes.c index 51538bc60..4b2dbd6e1 100644 --- a/module/icp/io/aes.c +++ b/module/icp/io/aes.c @@ -212,8 +212,8 @@ aes_mod_init(void) * are run in dedicated kernel threads to allow Linux 5.0+ kernels * to use SIMD operations. If for some reason this isn't possible, * fallback to the generic implementations. See the comment in - * include/linux/simd_x86.h for additional details. Additionally, - * this has the benefit of allowing them to be run in parallel. + * linux/simd_x86.h for additional details. Additionally, this has + * the benefit of allowing them to be run in parallel. */ taskqid_t aes_id = taskq_dispatch(system_taskq, aes_impl_init, NULL, TQ_SLEEP); |