Convert all HAVE_<name> SIMD gates to HAVE_SIMD(<name>)

The original names no longer exist, and the new ones will need to be
selectable based on the current compilation target.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes #18285
This commit is contained in:
Rob Norris
2026-03-04 22:28:21 +11:00
committed by Brian Behlendorf
parent 92a6ab405f
commit 35f74f84e6
33 changed files with 113 additions and 112 deletions
+5 -5
View File
@@ -47,19 +47,19 @@ static raidz_impl_ops_t vdev_raidz_fastest_impl = {
static const raidz_impl_ops_t *const raidz_all_maths[] = {
&vdev_raidz_original_impl,
&vdev_raidz_scalar_impl,
#if defined(__x86_64) && defined(HAVE_SSE2) /* only x86_64 for now */
#if defined(__x86_64) && HAVE_SIMD(SSE2) /* only x86_64 for now */
&vdev_raidz_sse2_impl,
#endif
#if defined(__x86_64) && defined(HAVE_SSSE3) /* only x86_64 for now */
#if defined(__x86_64) && HAVE_SIMD(SSSE3) /* only x86_64 for now */
&vdev_raidz_ssse3_impl,
#endif
#if defined(__x86_64) && defined(HAVE_AVX2) /* only x86_64 for now */
#if defined(__x86_64) && HAVE_SIMD(AVX2) /* only x86_64 for now */
&vdev_raidz_avx2_impl,
#endif
#if defined(__x86_64) && defined(HAVE_AVX512F) /* only x86_64 for now */
#if defined(__x86_64) && HAVE_SIMD(AVX512F) /* only x86_64 for now */
&vdev_raidz_avx512f_impl,
#endif
#if defined(__x86_64) && defined(HAVE_AVX512BW) /* only x86_64 for now */
#if defined(__x86_64) && HAVE_SIMD(AVX512BW) /* only x86_64 for now */
&vdev_raidz_avx512bw_impl,
#endif
#if defined(__aarch64__) && !defined(__FreeBSD__)
+3 -2
View File
@@ -22,9 +22,10 @@
/*
* Copyright (C) 2016 Gvozden Nešković. All rights reserved.
*/
#include <sys/isa_defs.h>
#if defined(__x86_64) && defined(HAVE_AVX2)
#if defined(__x86_64) && HAVE_SIMD(AVX2)
#include <sys/types.h>
#include <sys/simd.h>
@@ -411,4 +412,4 @@ const raidz_impl_ops_t vdev_raidz_avx2_impl = {
.name = "avx2"
};
#endif /* defined(__x86_64) && defined(HAVE_AVX2) */
#endif /* defined(__x86_64) && HAVE_SIMD(AVX2) */
+2 -2
View File
@@ -26,7 +26,7 @@
#include <sys/isa_defs.h>
#if defined(__x86_64) && defined(HAVE_AVX512BW)
#if defined(__x86_64) && HAVE_SIMD(AVX512BW)
#include <sys/param.h>
#include <sys/types.h>
@@ -411,4 +411,4 @@ const raidz_impl_ops_t vdev_raidz_avx512bw_impl = {
.name = "avx512bw"
};
#endif /* defined(__x86_64) && defined(HAVE_AVX512BW) */
#endif /* defined(__x86_64) && HAVE_SIMD(AVX512BW) */
+2 -2
View File
@@ -26,7 +26,7 @@
#include <sys/isa_defs.h>
#if defined(__x86_64) && defined(HAVE_AVX512F)
#if defined(__x86_64) && HAVE_SIMD(AVX512F)
#include <sys/types.h>
#include <sys/simd.h>
@@ -492,4 +492,4 @@ const raidz_impl_ops_t vdev_raidz_avx512f_impl = {
.name = "avx512f"
};
#endif /* defined(__x86_64) && defined(HAVE_AVX512F) */
#endif /* defined(__x86_64) && HAVE_SIMD(AVX512F) */
+2 -2
View File
@@ -25,7 +25,7 @@
#include <sys/isa_defs.h>
#if defined(__x86_64) && defined(HAVE_SSE2)
#if defined(__x86_64) && HAVE_SIMD(SSE2)
#include <sys/types.h>
#include <sys/simd.h>
@@ -629,4 +629,4 @@ const raidz_impl_ops_t vdev_raidz_sse2_impl = {
.name = "sse2"
};
#endif /* defined(__x86_64) && defined(HAVE_SSE2) */
#endif /* defined(__x86_64) && HAVE_SIMD(SSE2) */
+4 -4
View File
@@ -25,7 +25,7 @@
#include <sys/isa_defs.h>
#if defined(__x86_64) && defined(HAVE_SSSE3)
#if defined(__x86_64) && HAVE_SIMD(SSSE3)
#include <sys/types.h>
#include <sys/simd.h>
@@ -415,11 +415,11 @@ const raidz_impl_ops_t vdev_raidz_ssse3_impl = {
.name = "ssse3"
};
#endif /* defined(__x86_64) && defined(HAVE_SSSE3) */
#endif /* defined(__x86_64) && HAVE_SIMD(SSSE3) */
#if defined(__x86_64)
#if defined(HAVE_SSSE3) || defined(HAVE_AVX2) || defined(HAVE_AVX512BW)
#if HAVE_SIMD(SSSE3) || HAVE_SIMD(AVX2) || HAVE_SIMD(AVX512BW)
/* BEGIN CSTYLED */
const uint8_t
__attribute__((aligned(256))) gf_clmul_mod_lt[4*256][16] =
@@ -2474,5 +2474,5 @@ __attribute__((aligned(256))) gf_clmul_mod_lt[4*256][16] =
0xf8, 0x07, 0x06, 0xf9, 0x04, 0xfb, 0xfa, 0x05 }
};
/* END CSTYLED */
#endif /* defined(HAVE_SSSE3) || defined(HAVE_AVX2) || defined(HAVE_AVX512BW) */
#endif /* HAVE_SIMD(SSSE3) || HAVE_SIMD(AVX2) || HAVE_SIMD(AVX512BW) */
#endif /* defined(__x86_64) */