diff options
-rw-r--r-- | arch/x86/include/asm/fpu-internal.h | 11 | ||||
-rw-r--r-- | arch/x86/kernel/i387.c | 12 |
2 files changed, 13 insertions, 10 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 21000f0f0ae1..bdbba1a4de69 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -569,16 +569,7 @@ static inline unsigned short get_fpu_mxcsr(struct task_struct *tsk) } } -static inline int fpu_alloc(struct fpu *fpu) -{ - if (fpu->state) - return 0; - fpu->state = kmem_cache_alloc(task_xstate_cachep, GFP_KERNEL); - if (!fpu->state) - return -ENOMEM; - WARN_ON((unsigned long)fpu->state & 15); - return 0; -} +extern int fpu_alloc(struct fpu *fpu); static inline void fpu_free(struct fpu *fpu) { diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 5e4dae70ffa5..05fcc90087b0 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c @@ -246,6 +246,18 @@ void fpu_finit(struct fpu *fpu) } EXPORT_SYMBOL_GPL(fpu_finit); +int fpu_alloc(struct fpu *fpu) +{ + if (fpu->state) + return 0; + fpu->state = kmem_cache_alloc(task_xstate_cachep, GFP_KERNEL); + if (!fpu->state) + return -ENOMEM; + WARN_ON((unsigned long)fpu->state & 15); + return 0; +} +EXPORT_SYMBOL_GPL(fpu_alloc); + /* * Allocate the backing store for the current task's FPU registers * and initialize the registers themselves as well. |