x86/fpu: Remove __save_init_fpu()
authorIngo Molnar <mingo@kernel.org>
Wed, 22 Apr 2015 17:54:09 +0000 (19:54 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:21 +0000 (15:47 +0200)
__save_init_fpu() is just a trivial wrapper around fpu_save_init().

Remove the extra layer of obfuscation.

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 16a1c66cf4ee04795214b7651d1d6f6e5338deb7..1e2b6c67b1f1b810852441dafb59a0e3f93e98ac 100644 (file)
@@ -295,11 +295,6 @@ static inline int fpu_save_init(struct fpu *fpu)
        return 1;
 }
 
-static inline int __save_init_fpu(struct task_struct *tsk)
-{
-       return fpu_save_init(&tsk->thread.fpu);
-}
-
 static inline int fpu_restore_checking(struct fpu *fpu)
 {
        if (use_xsave())
@@ -439,7 +434,7 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta
                      (use_eager_fpu() || new->thread.fpu.counter > 5);
 
        if (__thread_has_fpu(old)) {
-               if (!__save_init_fpu(old))
+               if (!fpu_save_init(&old->thread.fpu))
                        task_disable_lazy_fpu_restore(old);
                else
                        old->thread.fpu.last_cpu = cpu;
index e898e83afa0ac04717d1bca82d8bfb2e3af0851f..6ce971ccd85b854dea4a4bfbd0f3d362ca52a7e2 100644 (file)
@@ -97,7 +97,7 @@ void __kernel_fpu_begin(void)
        kernel_fpu_disable();
 
        if (__thread_has_fpu(me)) {
-               __save_init_fpu(me);
+               fpu_save_init(&me->thread.fpu);
        } else {
                this_cpu_write(fpu_owner_task, NULL);
                if (!use_eager_fpu())
@@ -135,7 +135,7 @@ void fpu__save(struct task_struct *tsk)
                if (use_eager_fpu()) {
                        __save_fpu(tsk);
                } else {
-                       __save_init_fpu(tsk);
+                       fpu_save_init(&tsk->thread.fpu);
                        __thread_fpu_end(tsk);
                }
        }