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/algs | |
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/algs')
-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 |
5 files changed, 7 insertions, 6 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> /* |