aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2022-09-22 09:59:31 +0000
committerMartin Matuska <mm@FreeBSD.org>2022-09-22 10:04:28 +0000
commit1761afc50af7f2fc6bff0924da0e5b02ec597141 (patch)
tree1e53c3e5358af444dd177562c2a500bf6471e16b
parent12aeeb91903bbb4a117aa00cd32a7c0504ebded0 (diff)
downloadsrc-1761afc50af7f2fc6bff0924da0e5b02ec597141.tar.gz
src-1761afc50af7f2fc6bff0924da0e5b02ec597141.zip
zfs: fix powerpc build broken in c7046f76c2
The breakage was introduced in OpenZFS commit 48cf170d5. When a (different) fix solving this issue gets upstreamed it will replace the current fix in the next merge from OpenZFS.
-rw-r--r--sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h3
-rw-r--r--sys/contrib/openzfs/lib/libspl/include/sys/simd.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h
index b90240580c7a..f101e3192fac 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h
@@ -53,7 +53,7 @@
#include <sys/cdefs.h>
#include <machine/pcb.h>
-#include <powerpc/cpu.h>
+#include <machine/cpu.h>
#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
@@ -88,3 +88,4 @@ zfs_isa207_available(void)
{
return ((cpu_features2 & PPC_FEATURE2_ARCH_2_07) != 0);
}
+#endif
diff --git a/sys/contrib/openzfs/lib/libspl/include/sys/simd.h b/sys/contrib/openzfs/lib/libspl/include/sys/simd.h
index c0099dd7919b..2be5173f317c 100644
--- a/sys/contrib/openzfs/lib/libspl/include/sys/simd.h
+++ b/sys/contrib/openzfs/lib/libspl/include/sys/simd.h
@@ -453,12 +453,12 @@ zfs_avx512vbmi_available(void)
#elif defined(__powerpc__)
/* including <sys/auxv.h> clashes with AT_UID and others */
-extern unsigned long getauxval(unsigned long type);
#if defined(__FreeBSD__)
#define AT_HWCAP 25 /* CPU feature flags. */
#define AT_HWCAP2 26 /* CPU feature flags 2. */
extern int elf_aux_info(int aux, void *buf, int buflen);
-static unsigned long getauxval(unsigned long key)
+static inline unsigned long
+getauxval(unsigned long key)
{
unsigned long val = 0UL;
@@ -470,6 +470,7 @@ static unsigned long getauxval(unsigned long key)
#elif defined(__linux__)
#define AT_HWCAP 16 /* CPU feature flags. */
#define AT_HWCAP2 26 /* CPU feature flags 2. */
+extern unsigned long getauxval(unsigned long type);
#endif
#define kfpu_allowed() 1