mirror of
https://github.com/opnsense/src.git
synced 2026-06-30 13:00:01 -04:00
simd_powerpc.h: enable FPU on FreeBSD
FreeBSD nowadays supports FPU in the kernel on powerpc*, so enable it. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Piotr Kubaj <pkubaj@FreeBSD.org> Closes #17191
This commit is contained in:
parent
75e921da6f
commit
11ca12dbd3
1 changed files with 10 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue