mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
simd_powerpc.h: enable FPU on FreeBSD
FreeBSD nowadays supports FPU in the kernel on powerpc*, so enable it. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Piotr Kubaj <[email protected]> Closes #17191
This commit is contained in:
1 parent
75e921da6f
commit
11ca12dbd3
1 file changed
+10
-3
@@ -49,11 +49,18 @@
|
||||
|
||||
#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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user