mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <lundman@lundman.net> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Matthew Macy <mmacy@FreeBSD.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #9198
This commit is contained in:
committed by
Brian Behlendorf
parent
d02186ee2b
commit
006e9a4088
@@ -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.
|
||||
|
||||
@@ -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[],
|
||||
|
||||
@@ -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[],
|
||||
|
||||
@@ -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); \
|
||||
|
||||
@@ -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>
|
||||
|
||||
/*
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user