aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-05-01 16:07:00 +0000
committerWarner Losh <imp@FreeBSD.org>2023-05-01 21:02:54 +0000
commit6c8358cd7ffd71acec74036429a8afb502720722 (patch)
tree0fb22b6a73f2d9c36f318fa17c14b7383f3c4b72 /sys/contrib/openzfs/module
parent96b119340eec331bdbbbdea606dae64cd2dce774 (diff)
downloadsrc-6c8358cd7ffd71acec74036429a8afb502720722.tar.gz
src-6c8358cd7ffd71acec74036429a8afb502720722.zip
stand: back out the most of the horrible aarch64 kludge
Add one ifdef to upstrem code and get rid of compiling the horrible checked-in aarch64 assembler for the boot loader that the loader will never use. I'll attempt to upstream this and adjust as needed. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39897
Diffstat (limited to 'sys/contrib/openzfs/module')
-rw-r--r--sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c b/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c
index f3f48c2dfa1a..5684b4ff1a97 100644
--- a/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c
+++ b/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c
@@ -30,10 +30,13 @@
#include "blake3_impl.h"
-#if defined(__aarch64__) || \
+#if !defined(OMIT_SIMD) && (defined(__aarch64__) || \
(defined(__x86_64) && defined(HAVE_SSE2)) || \
- (defined(__PPC64__) && defined(__LITTLE_ENDIAN__))
+ (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)))
+#define USE_SIMD
+#endif
+#ifdef USE_SIMD
extern void ASMABI zfs_blake3_compress_in_place_sse2(uint32_t cv[8],
const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len,
uint64_t counter, uint8_t flags);
@@ -96,9 +99,7 @@ const blake3_ops_t blake3_sse2_impl = {
};
#endif
-#if defined(__aarch64__) || \
- (defined(__x86_64) && defined(HAVE_SSE2)) || \
- (defined(__PPC64__) && defined(__LITTLE_ENDIAN__))
+#ifdef USE_SIMD
extern void ASMABI zfs_blake3_compress_in_place_sse41(uint32_t cv[8],
const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len,
@@ -257,6 +258,7 @@ extern const blake3_ops_t blake3_generic_impl;
static const blake3_ops_t *const blake3_impls[] = {
&blake3_generic_impl,
+#ifdef USE_SIMD
#if defined(__aarch64__) || \
(defined(__x86_64) && defined(HAVE_SSE2)) || \
(defined(__PPC64__) && defined(__LITTLE_ENDIAN__))
@@ -273,6 +275,7 @@ static const blake3_ops_t *const blake3_impls[] = {
#if defined(__x86_64) && defined(HAVE_AVX512F) && defined(HAVE_AVX512VL)
&blake3_avx512_impl,
#endif
+#endif
};
/* use the generic implementation functions */