x86/fpu: Uninline fpstate_free() and move it next to the allocation function
authorIngo Molnar <mingo@kernel.org>
Wed, 22 Apr 2015 13:58:37 +0000 (15:58 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:20 +0000 (15:47 +0200)
Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/fpu-internal.h
arch/x86/kernel/fpu/core.c

index 6c1ceb7c3f9adb6984cd66f21bd2662fc8d68f9e..16a1c66cf4ee04795214b7651d1d6f6e5338deb7 100644 (file)
@@ -567,16 +567,9 @@ static inline unsigned short get_fpu_mxcsr(struct task_struct *tsk)
 extern void fpstate_cache_init(void);
 
 extern int fpstate_alloc(struct fpu *fpu);
+extern void fpstate_free(struct fpu *fpu);
 extern int fpu__copy(struct task_struct *dst, struct task_struct *src);
 
-static inline void fpstate_free(struct fpu *fpu)
-{
-       if (fpu->state) {
-               kmem_cache_free(task_xstate_cachep, fpu->state);
-               fpu->state = NULL;
-       }
-}
-
 static inline void fpu_copy(struct task_struct *dst, struct task_struct *src)
 {
        if (use_eager_fpu()) {
index 05df212449ed4c69617b31fe968b25026d835817..b00d1b3c58119bc87d1d60d1b61b1f54bd3df860 100644 (file)
@@ -178,6 +178,15 @@ int fpstate_alloc(struct fpu *fpu)
 }
 EXPORT_SYMBOL_GPL(fpstate_alloc);
 
+void fpstate_free(struct fpu *fpu)
+{
+       if (fpu->state) {
+               kmem_cache_free(task_xstate_cachep, fpu->state);
+               fpu->state = NULL;
+       }
+}
+EXPORT_SYMBOL_GPL(fpstate_free);
+
 int fpu__copy(struct task_struct *dst, struct task_struct *src)
 {
        dst->thread.fpu.counter = 0;
This page took 0.026647 seconds and 5 git commands to generate.