]> git.karo-electronics.de Git - linux-beck.git/commitdiff
x86/fpu: Rename __thread_fpu_end() to fpregs_deactivate()
authorIngo Molnar <mingo@kernel.org>
Fri, 24 Apr 2015 12:31:27 +0000 (14:31 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:37 +0000 (15:47 +0200)
Propagate the 'fpu->fpregs_active' naming to the high level function that
clears it.

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 18a62239c73da28b3f47f1ffaa682f5f63d832ca..0292fcc4d44194ec5d273032236200815181dc8a 100644 (file)
@@ -335,18 +335,18 @@ static inline void __fpregs_activate(struct fpu *fpu)
  * These generally need preemption protection to work,
  * do try to avoid using these on their own.
  */
-static inline void __thread_fpu_end(struct fpu *fpu)
+static inline void fpregs_activate(struct fpu *fpu)
 {
-       __fpregs_deactivate(fpu);
        if (!use_eager_fpu())
-               stts();
+               clts();
+       __fpregs_activate(fpu);
 }
 
-static inline void fpregs_activate(struct fpu *fpu)
+static inline void fpregs_deactivate(struct fpu *fpu)
 {
+       __fpregs_deactivate(fpu);
        if (!use_eager_fpu())
-               clts();
-       __fpregs_activate(fpu);
+               stts();
 }
 
 static inline void drop_fpu(struct fpu *fpu)
@@ -362,7 +362,7 @@ static inline void drop_fpu(struct fpu *fpu)
                asm volatile("1: fwait\n"
                             "2:\n"
                             _ASM_EXTABLE(1b, 2b));
-               __thread_fpu_end(fpu);
+               fpregs_deactivate(fpu);
        }
 
        fpu->fpstate_active = 0;
index a1768ec8e6438fcb0dbeb31226c9ebb468f31315..3d2ec4bd7f8c2e10c903c897a069d71f0171dac1 100644 (file)
@@ -152,7 +152,7 @@ void fpu__save(struct fpu *fpu)
                        __save_fpu(fpu);
                } else {
                        fpu_save_init(fpu);
-                       __thread_fpu_end(fpu);
+                       fpregs_deactivate(fpu);
                }
        }
        preempt_enable();