diff --git a/main/zfs-rpi/APKBUILD b/main/zfs-rpi/APKBUILD index ee9c468b252c9a3453868afdfbf9f7645fcb24f2..c26daf879aa4dd1f932ec571141361013aaf39ac 100644 --- a/main/zfs-rpi/APKBUILD +++ b/main/zfs-rpi/APKBUILD @@ -38,7 +38,8 @@ depends_dev="glib-dev e2fsprogs-dev util-linux-dev libtirpc-dev makedepends="$depends_dev linux-headers xz" install_if="zfs $_kpkg=$_kpkgver" subpackages="$pkgname-dev" -source="https://github.com/openzfs/zfs/releases/download/zfs-$_ver/zfs-$_ver.tar.gz" +source="https://github.com/openzfs/zfs/releases/download/zfs-$_ver/zfs-$_ver.tar.gz + aarch64-disable-neon.patch" builddir="$srcdir/$_name-$_ver" for f in $_extra_flavors; do @@ -107,4 +108,5 @@ dev() { sha512sums=" 05e17046ac4f0ba923151be3e554e075db4783c8936c5dcee2d3b6d459fb386ba33f9eb38d15c185db58a1d26926147a66c3b3fe14e9de40987f0e95efa2bb31 zfs-2.2.1.tar.gz +50499c40a670e8b447279912953732c015dfb3559372d5e203be30e1e22663920747c3a65f995e94b70bed0d5fdf82f72e260422792097578a50b49001df7aee aarch64-disable-neon.patch " diff --git a/main/zfs-rpi/aarch64-disable-neon.patch b/main/zfs-rpi/aarch64-disable-neon.patch new file mode 100644 index 0000000000000000000000000000000000000000..b382f2ae8e7406d17601941bdb2e2e2fed5a8604 --- /dev/null +++ b/main/zfs-rpi/aarch64-disable-neon.patch @@ -0,0 +1,158 @@ +ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_begin' +ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_end' + +There is no way around this so just disable all zfs kernel SIMD on aarch64 +for the time being. + +diff --git a/include/os/linux/kernel/linux/simd.h b/include/os/linux/kernel/linux/simd.h +index f4376b2..02f8110 100644 +--- a/include/os/linux/kernel/linux/simd.h ++++ b/include/os/linux/kernel/linux/simd.h +@@ -31,9 +31,6 @@ + #elif defined(__arm__) + #include <linux/simd_arm.h> + +-#elif defined(__aarch64__) +-#include <linux/simd_aarch64.h> +- + #elif defined(__powerpc__) + #include <linux/simd_powerpc.h> + +diff --git a/module/Kbuild.in b/module/Kbuild.in +index 4395938..dc991b6 100644 +--- a/module/Kbuild.in ++++ b/module/Kbuild.in +@@ -169,7 +169,6 @@ zfs-$(CONFIG_X86) += $(addprefix icp/,$(ICP_OBJS_X86)) + zfs-$(CONFIG_UML_X86)+= $(addprefix icp/,$(ICP_OBJS_X86)) + zfs-$(CONFIG_X86_64) += $(addprefix icp/,$(ICP_OBJS_X86_64)) + zfs-$(CONFIG_ARM) += $(addprefix icp/,$(ICP_OBJS_ARM)) +-zfs-$(CONFIG_ARM64) += $(addprefix icp/,$(ICP_OBJS_ARM64)) + zfs-$(CONFIG_PPC) += $(addprefix icp/,$(ICP_OBJS_PPC_PPC64)) + zfs-$(CONFIG_PPC64) += $(addprefix icp/,$(ICP_OBJS_PPC_PPC64)) + +@@ -257,7 +256,6 @@ ZCOMMON_OBJS_ARM64 := \ + zfs-objs += $(addprefix zcommon/,$(ZCOMMON_OBJS)) + zfs-$(CONFIG_X86) += $(addprefix zcommon/,$(ZCOMMON_OBJS_X86)) + zfs-$(CONFIG_UML_X86)+= $(addprefix zcommon/,$(ZCOMMON_OBJS_X86)) +-zfs-$(CONFIG_ARM64) += $(addprefix zcommon/,$(ZCOMMON_OBJS_ARM64)) + + + # Zstd uses -O3 by default, so we should follow +@@ -484,7 +482,6 @@ ZFS_OBJS_PPC_PPC64 := \ + zfs-objs += $(addprefix zfs/,$(ZFS_OBJS)) $(addprefix os/linux/zfs/,$(ZFS_OBJS_OS)) + zfs-$(CONFIG_X86) += $(addprefix zfs/,$(ZFS_OBJS_X86)) + zfs-$(CONFIG_UML_X86)+= $(addprefix zfs/,$(ZFS_OBJS_X86)) +-zfs-$(CONFIG_ARM64) += $(addprefix zfs/,$(ZFS_OBJS_ARM64)) + zfs-$(CONFIG_PPC) += $(addprefix zfs/,$(ZFS_OBJS_PPC_PPC64)) + zfs-$(CONFIG_PPC64) += $(addprefix zfs/,$(ZFS_OBJS_PPC_PPC64)) + +diff --git a/module/icp/algs/blake3/blake3_impl.c b/module/icp/algs/blake3/blake3_impl.c +index f3f48c2..df02487 100644 +--- a/module/icp/algs/blake3/blake3_impl.c ++++ b/module/icp/algs/blake3/blake3_impl.c +@@ -30,7 +30,7 @@ + + #include "blake3_impl.h" + +-#if defined(__aarch64__) || \ ++#if 0 || \ + (defined(__x86_64) && defined(HAVE_SSE2)) || \ + (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) + +@@ -96,7 +96,7 @@ const blake3_ops_t blake3_sse2_impl = { + }; + #endif + +-#if defined(__aarch64__) || \ ++#if 0 || \ + (defined(__x86_64) && defined(HAVE_SSE2)) || \ + (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) + +@@ -257,12 +257,12 @@ extern const blake3_ops_t blake3_generic_impl; + + static const blake3_ops_t *const blake3_impls[] = { + &blake3_generic_impl, +-#if defined(__aarch64__) || \ ++#if 0 || \ + (defined(__x86_64) && defined(HAVE_SSE2)) || \ + (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) + &blake3_sse2_impl, + #endif +-#if defined(__aarch64__) || \ ++#if 0 || \ + (defined(__x86_64) && defined(HAVE_SSE4_1)) || \ + (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) + &blake3_sse41_impl, +diff --git a/module/icp/algs/sha2/sha256_impl.c b/module/icp/algs/sha2/sha256_impl.c +index 01ce5cb..69f8233 100644 +--- a/module/icp/algs/sha2/sha256_impl.c ++++ b/module/icp/algs/sha2/sha256_impl.c +@@ -118,7 +118,7 @@ const sha256_ops_t sha256_shani_impl = { + }; + #endif + +-#elif defined(__aarch64__) || (defined(__arm__) && __ARM_ARCH > 6) ++#elif (defined(__aarch64__) && 0) || (defined(__arm__) && __ARM_ARCH > 6) + static boolean_t sha256_have_neon(void) + { + return (kfpu_allowed() && zfs_neon_available()); +@@ -192,7 +192,7 @@ static const sha256_ops_t *const sha256_impls[] = { + #if defined(__x86_64) && defined(HAVE_SSE4_1) + &sha256_shani_impl, + #endif +-#if defined(__aarch64__) || (defined(__arm__) && __ARM_ARCH > 6) ++#if 0 || (defined(__arm__) && __ARM_ARCH > 6) + &sha256_armv7_impl, + &sha256_neon_impl, + &sha256_armv8_impl, +diff --git a/module/icp/algs/sha2/sha512_impl.c b/module/icp/algs/sha2/sha512_impl.c +index 27b35a6..23f5ea5 100644 +--- a/module/icp/algs/sha2/sha512_impl.c ++++ b/module/icp/algs/sha2/sha512_impl.c +@@ -88,7 +88,7 @@ const sha512_ops_t sha512_avx2_impl = { + }; + #endif + +-#elif defined(__aarch64__) ++#elif defined(__aarch64__) && 0 + extern void zfs_sha512_block_armv7(uint64_t s[8], const void *, size_t); + const sha512_ops_t sha512_armv7_impl = { + .is_supported = sha2_is_supported, +@@ -164,7 +164,7 @@ static const sha512_ops_t *const sha512_impls[] = { + #if defined(__x86_64) && defined(HAVE_AVX2) + &sha512_avx2_impl, + #endif +-#if defined(__aarch64__) ++#if 0 + &sha512_armv7_impl, + &sha512_armv8_impl, + #endif +diff --git a/module/zcommon/zfs_fletcher.c b/module/zcommon/zfs_fletcher.c +index 619ddef..39dbd65 100644 +--- a/module/zcommon/zfs_fletcher.c ++++ b/module/zcommon/zfs_fletcher.c +@@ -188,9 +188,6 @@ static const fletcher_4_ops_t *fletcher_4_impls[] = { + #if defined(__x86_64) && defined(HAVE_AVX512BW) + &fletcher_4_avx512bw_ops, + #endif +-#if defined(__aarch64__) && !defined(__FreeBSD__) +- &fletcher_4_aarch64_neon_ops, +-#endif + }; + + /* Hold all supported implementations */ +diff --git a/module/zfs/vdev_raidz_math.c b/module/zfs/vdev_raidz_math.c +index e12b961..62c0063 100644 +--- a/module/zfs/vdev_raidz_math.c ++++ b/module/zfs/vdev_raidz_math.c +@@ -61,10 +61,6 @@ static const raidz_impl_ops_t *const raidz_all_maths[] = { + #if defined(__x86_64) && defined(HAVE_AVX512BW) /* only x86_64 for now */ + &vdev_raidz_avx512bw_impl, + #endif +-#if defined(__aarch64__) && !defined(__FreeBSD__) +- &vdev_raidz_aarch64_neon_impl, +- &vdev_raidz_aarch64_neonx2_impl, +-#endif + #if defined(__powerpc__) && defined(__altivec__) + &vdev_raidz_powerpc_altivec_impl, + #endif