git: d1aefbc04c84 - main - zfs: fix static module build broken in 1f1e2261e

From: Martin Matuska <mm_at_FreeBSD.org>
Date: Thu, 23 Jun 2022 17:46:36 UTC
The branch main has been updated by mm:

URL: https://cgit.FreeBSD.org/src/commit/?id=d1aefbc04c84476fba06ff40e30464e0948b5ccf

commit d1aefbc04c84476fba06ff40e30464e0948b5ccf
Author:     Martin Matuska <mm@FreeBSD.org>
AuthorDate: 2022-06-23 17:42:55 +0000
Commit:     Martin Matuska <mm@FreeBSD.org>
CommitDate: 2022-06-23 17:44:38 +0000

    zfs: fix static module build broken in 1f1e2261e
---
 sys/conf/files         | 8 ++++++++
 sys/conf/files.amd64   | 5 +++++
 sys/conf/files.arm64   | 3 +++
 sys/conf/files.powerpc | 2 ++
 sys/conf/kern.pre.mk   | 4 ++--
 5 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index e2e0ca9759db..e23e23fb4fad 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -241,10 +241,17 @@ contrib/openzfs/module/zcommon/zprop_common.c		optional zfs compile-with "${ZFS_
 # zfs edon-r hash support
 contrib/openzfs/module/icp/algs/edonr/edonr.c		optional zfs compile-with "${ZFS_C}"
 
+# zfs blake3 hash support
+contrib/openzfs/module/icp/algs/blake3/blake3.c		optional zfs compile-with "${ZFS_C}"
+contrib/openzfs/module/icp/algs/blake3/blake3_generic.c	optional zfs compile-with "${ZFS_C}"
+contrib/openzfs/module/icp/algs/blake3/blake3_impl.c	optional zfs compile-with "${ZFS_C}"
+contrib/openzfs/module/icp/algs/blake3/blake3_x86-64.c	optional zfs compile-with "${ZFS_C}"
+
 #zfs core common code
 contrib/openzfs/module/zfs/abd.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/aggsum.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/arc.c		optional zfs compile-with "${ZFS_C}"
+contrib/openzfs/module/zfs/blake3_zfs.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/blkptr.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/bplist.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/bpobj.c		optional zfs compile-with "${ZFS_C}"
@@ -342,6 +349,7 @@ contrib/openzfs/module/zfs/zcp_set.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/zcp_synctask.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/zfeature.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/zfs_byteswap.c		optional zfs compile-with "${ZFS_C}"
+contrib/openzfs/module/zfs/zfs_chksum.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/zfs_fm.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/zfs_fuid.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zfs/zfs_ioctl.c		optional zfs compile-with "${ZFS_C}"
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 7843933c6cd6..c6e32998567e 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -406,6 +406,11 @@ x86/x86/mptable_pci.c		optional	mptable pci
 x86/x86/msi.c			optional	pci
 x86/xen/pv.c			optional	xenhvm
 
+contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_avx2.S      optional zfs compile-with "${ZFS_S}"
+contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_avx512.S    optional zfs compile-with "${ZFS_S}"
+contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse2.S      optional zfs compile-with "${ZFS_S}"
+contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse41.S     optional zfs compile-with "${ZFS_S}"
+
 contrib/openzfs/module/zcommon/zfs_fletcher_avx512.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zcommon/zfs_fletcher_intel.c		optional zfs compile-with "${ZFS_C}"
 contrib/openzfs/module/zcommon/zfs_fletcher_sse.c		optional zfs compile-with "${ZFS_C}"
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index acd6ca08de70..52eb4de5fef3 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -156,6 +156,9 @@ cddl/dev/dtrace/aarch64/dtrace_asm.S		optional dtrace compile-with "${DTRACE_S}"
 cddl/dev/dtrace/aarch64/dtrace_subr.c		optional dtrace compile-with "${DTRACE_C}"
 cddl/dev/fbt/aarch64/fbt_isa.c			optional dtrace_fbt | dtraceall compile-with "${FBT_C}"
 
+contrib/openzfs/module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S		optional zfs compile-with "${ZFS_S}"
+contrib/openzfs/module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S	optional zfs compile-with "${ZFS_S}"
+
 ##
 ## ASoC support
 ##
diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc
index eacce785f914..17c6bf278b40 100644
--- a/sys/conf/files.powerpc
+++ b/sys/conf/files.powerpc
@@ -10,6 +10,8 @@
 #
 
 # There is only an asm version on ppc64.
+contrib/openzfs/module/icp/asm-ppc64/blake3/b3_ppc64le_sse2.S	optional zfs compile-with "${ZFS_S}"
+contrib/openzfs/module/icp/asm-ppc64/blake3/b3_ppc64le_sse41.S	optional zfs compile-with "${ZFS_S}"
 cddl/compat/opensolaris/kern/opensolaris_atomic.c			optional zfs powerpc | dtrace powerpc | zfs powerpcspe | dtrace powerpcspe compile-with "${ZFS_C}"
 cddl/dev/dtrace/powerpc/dtrace_asm.S		optional dtrace compile-with "${DTRACE_S}"
 cddl/dev/dtrace/powerpc/dtrace_subr.c		optional dtrace compile-with "${DTRACE_C}"
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 337da3dd822d..75f5128c52d2 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -245,8 +245,8 @@ ZFS_CFLAGS+=	${CDDL_CFLAGS} -DBUILDING_ZFS -DHAVE_UIO_ZEROCOPY \
 	-DIN_FREEBSD_BASE
 
 .if ${MACHINE_ARCH} == "amd64"
-ZFS_CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_SSE2 -DHAVE_AVX512F \
-	-DHAVE_SSSE3 -DHAVE_AVX512BW
+ZFS_CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \
+	-DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW
 .endif
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \