aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMartin Matuška <[email protected]>2023-04-06 19:35:02 +0200
committerGitHub <[email protected]>2023-04-06 10:35:02 -0700
commita3f82aec933660558d6512a83481527ef731ff0c (patch)
tree1d131a689adc233d7c3d20efdf32a0798475cba4 /include
parentece7ab7e7de81a9a51923d7baa7db3577de4aace (diff)
Miscellaneous FreBSD compilation bugfixes
Add missing machine/md_var.h to spl/sys/simd_aarch64.h and spl/sys/simd_arm.h In spl/sys/simd_x86.h, PCB_FPUNOSAVE exists only on amd64, use PCB_NPXNOSAVE on i386 In FreeBSD sys/elf_common.h redefines AT_UID and AT_GID on FreeBSD, we need a hack in vnode.h similar to Linux. sys/simd.h needs to be included early. In zfs_freebsd_copy_file_range() we pass a (size_t *)lenp to zfs_clone_range() that expects a (uint64_t *) Allow compiling armv6 world by limiting ARM macros in sha256_impl.c and sha512_impl.c to __ARM_ARCH > 6 Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Pawel Jakub Dawidek <[email protected]> Reviewed-by: Signed-off-by: WHR <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #14674
Diffstat (limited to 'include')
-rw-r--r--include/os/freebsd/spl/sys/simd_aarch64.h1
-rw-r--r--include/os/freebsd/spl/sys/simd_arm.h1
-rw-r--r--include/os/freebsd/spl/sys/simd_x86.h4
-rw-r--r--include/os/freebsd/spl/sys/vnode.h4
4 files changed, 10 insertions, 0 deletions
diff --git a/include/os/freebsd/spl/sys/simd_aarch64.h b/include/os/freebsd/spl/sys/simd_aarch64.h
index 847c2ed29..df33bdaec 100644
--- a/include/os/freebsd/spl/sys/simd_aarch64.h
+++ b/include/os/freebsd/spl/sys/simd_aarch64.h
@@ -45,6 +45,7 @@
#include <sys/types.h>
#include <machine/elf.h>
+#include <machine/md_var.h>
#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
diff --git a/include/os/freebsd/spl/sys/simd_arm.h b/include/os/freebsd/spl/sys/simd_arm.h
index f6362cd6b..178fbc3b3 100644
--- a/include/os/freebsd/spl/sys/simd_arm.h
+++ b/include/os/freebsd/spl/sys/simd_arm.h
@@ -44,6 +44,7 @@
#include <sys/types.h>
#include <machine/elf.h>
+#include <machine/md_var.h>
#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
diff --git a/include/os/freebsd/spl/sys/simd_x86.h b/include/os/freebsd/spl/sys/simd_x86.h
index 6512d4fcb..8e93b558d 100644
--- a/include/os/freebsd/spl/sys/simd_x86.h
+++ b/include/os/freebsd/spl/sys/simd_x86.h
@@ -45,6 +45,10 @@
fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX);\
}
+#ifndef PCB_FPUNOSAVE
+#define PCB_FPUNOSAVE PCB_NPXNOSAVE
+#endif
+
#define kfpu_end() { \
if (__predict_false(curpcb->pcb_flags & PCB_FPUNOSAVE)) \
fpu_kern_leave(curthread, NULL); \
diff --git a/include/os/freebsd/spl/sys/vnode.h b/include/os/freebsd/spl/sys/vnode.h
index 483d12ae5..ab1727dca 100644
--- a/include/os/freebsd/spl/sys/vnode.h
+++ b/include/os/freebsd/spl/sys/vnode.h
@@ -143,6 +143,10 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync)
/*
* Attributes of interest to the caller of setattr or getattr.
*/
+
+#undef AT_UID
+#undef AT_GID
+
#define AT_MODE 0x00002
#define AT_UID 0x00004
#define AT_GID 0x00008