Revert "LinuxKPI: Do not use explicit context in FPU sections on powerpc64"
kmalloc() support within FPU sections will be redone in other way.
This reverts commit b4efc62776.
Sponsored by: Serenity Cyber Security, LLC
Requested by: jhb
This commit is contained in:
@@ -33,6 +33,11 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \
|
||||
defined(__i386__) || defined(__powerpc64__)
|
||||
#define LKPI_HAVE_FPU_CTX
|
||||
#endif
|
||||
|
||||
struct domainset;
|
||||
struct thread;
|
||||
struct task_struct;
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <vm/uma.h>
|
||||
|
||||
#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \
|
||||
defined(__i386__)
|
||||
#ifdef LKPI_HAVE_FPU_CTX
|
||||
#include <machine/fpu.h>
|
||||
#endif
|
||||
|
||||
@@ -161,8 +160,7 @@ linux_alloc_current(struct thread *td, int flags)
|
||||
int
|
||||
linux_set_fpu_ctx(struct task_struct *task)
|
||||
{
|
||||
#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \
|
||||
defined(__i386__)
|
||||
#ifdef LKPI_HAVE_FPU_CTX
|
||||
if (task->fpu_ctx == NULL && curthread->td_critnest == 0)
|
||||
task->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NOWAIT);
|
||||
#endif
|
||||
@@ -192,8 +190,7 @@ void
|
||||
linux_free_current(struct task_struct *ts)
|
||||
{
|
||||
mmput(ts->mm);
|
||||
#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \
|
||||
defined(__i386__)
|
||||
#ifdef LKPI_HAVE_FPU_CTX
|
||||
if (ts->fpu_ctx != NULL)
|
||||
fpu_kern_free_ctx(ts->fpu_ctx);
|
||||
#endif
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
|
||||
#include <asm/fpu/api.h>
|
||||
|
||||
#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \
|
||||
defined(__i386__) || defined(__powerpc64__)
|
||||
#ifdef LKPI_HAVE_FPU_CTX
|
||||
|
||||
#include <machine/fpu.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user