mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 03:45:02 +01:00
FreeBSD: Wire sha512 offload to the build
FreeBSD main just got the CPUID_STDEXT4_SHA512 define. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rob Norris <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Closes #18732
This commit is contained in:
1 parent
1ff51ebedd
commit
37f066e3c9
2 files changed
+15
-1
No files matched your search
@@ -191,6 +191,20 @@ zfs_shani_available(void)
|
||||
return (has_shani && __ymm_enabled());
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if SHA-512 extension is available
|
||||
*/
|
||||
static inline boolean_t
|
||||
zfs_sha512ext_available(void)
|
||||
{
|
||||
#if defined(CPUID_STDEXT4_SHA512)
|
||||
return ((cpu_stdext_feature4 & CPUID_STDEXT4_SHA512) != 0 &&
|
||||
__ymm_enabled());
|
||||
#else
|
||||
return (B_FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* AVX-512 family of instruction sets:
|
||||
*
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS -D__BSD_VISIBLE=1 \
|
||||
CFLAGS+= -D__x86_64 -DHAVE_TOOLCHAIN_SSE2 -DHAVE_TOOLCHAIN_SSSE3 \
|
||||
-DHAVE_TOOLCHAIN_SSE4_1 -DHAVE_TOOLCHAIN_AVX -DHAVE_TOOLCHAIN_AVX2 \
|
||||
-DHAVE_TOOLCHAIN_AVX512F -DHAVE_TOOLCHAIN_AVX512VL \
|
||||
-DHAVE_TOOLCHAIN_AVX512BW
|
||||
-DHAVE_TOOLCHAIN_AVX512BW -DHAVE_TOOLCHAIN_SHA512EXT
|
||||
.endif
|
||||
|
||||
.if defined(WITH_DEBUG) && ${WITH_DEBUG} == "true"
|
||||
|
||||
Reference in new issue
Block a user