Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147234192
D49538.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D49538.diff
View Options
diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc
--- a/sys/conf/files.powerpc
+++ b/sys/conf/files.powerpc
@@ -17,8 +17,17 @@
# zfs sha2 hash support
contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S optional zfs compile-with "${ZFS_S}"
contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S optional zfs compile-with "${ZFS_S}"
-contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S optional zfs compile-with "${ZFS_S}"
-contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S optional zfs compile-with "${ZFS_S}"
+zfs-sha256-ppc.o optional zfs \
+ dependency "$S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S" \
+ compile-with "${CC} -c ${ZFS_ASM_CFLAGS} -o ${.TARGET} ${WERROR} $S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S" \
+ no-implicit-rule \
+ clean "zfs-sha256-ppc.o"
+
+zfs-sha512-ppc.o optional zfs \
+ dependency "$S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S" \
+ compile-with "${CC} -c ${ZFS_ASM_CFLAGS} -o ${.TARGET} ${WERROR} $S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S" \
+ no-implicit-rule \
+ clean "zfs-sha512-ppc.o"
# openssl ppc common files
crypto/openssl/ossl_ppc.c optional ossl powerpc64 | ossl powerpc64le
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
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h
@@ -44,16 +44,25 @@
#ifndef _FREEBSD_SIMD_POWERPC_H
#define _FREEBSD_SIMD_POWERPC_H
+#include <machine/pcpu.h>
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/pcb.h>
#include <machine/cpu.h>
+#include <machine/fpu.h>
-#define kfpu_allowed() 0
+#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
-#define kfpu_begin() do {} while (0)
-#define kfpu_end() do {} while (0)
+#define kfpu_begin() { \
+ if (__predict_false(!is_fpu_kern_thread(0))) \
+ fpu_kern_enter(PCPU_GET(curthread), NULL, FPU_KERN_NOCTX);\
+}
+#define kfpu_end() { \
+ if (__predict_false(PCPU_GET(curpcb)->pcb_flags & PCB_KERN_FPU_NOSAVE))\
+ fpu_kern_leave(PCPU_GET(curthread), NULL); \
+}
#define kfpu_init() (0)
#define kfpu_fini() do {} while (0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 10, 8:07 AM (11 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29482653
Default Alt Text
D49538.diff (2 KB)
Attached To
Mode
D49538: zfs: enable FPU on powerpc*
Attached
Detach File
Event Timeline
Log In to Comment