x86/fpu: Rename __thread_fpu_end() to fpregs_deactivate()

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>
This commit is contained in:
Ingo Molnar 2015-04-24 14:31:27 +02:00
parent 232f62cdd7
commit 66af8e2764
2 changed files with 9 additions and 9 deletions

View File

@ -335,13 +335,6 @@ static inline void __fpregs_activate(struct fpu *fpu)
* These generally need preemption protection to work, * These generally need preemption protection to work,
* do try to avoid using these on their own. * do try to avoid using these on their own.
*/ */
static inline void __thread_fpu_end(struct fpu *fpu)
{
__fpregs_deactivate(fpu);
if (!use_eager_fpu())
stts();
}
static inline void fpregs_activate(struct fpu *fpu) static inline void fpregs_activate(struct fpu *fpu)
{ {
if (!use_eager_fpu()) if (!use_eager_fpu())
@ -349,6 +342,13 @@ static inline void fpregs_activate(struct fpu *fpu)
__fpregs_activate(fpu); __fpregs_activate(fpu);
} }
static inline void fpregs_deactivate(struct fpu *fpu)
{
__fpregs_deactivate(fpu);
if (!use_eager_fpu())
stts();
}
static inline void drop_fpu(struct fpu *fpu) 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" asm volatile("1: fwait\n"
"2:\n" "2:\n"
_ASM_EXTABLE(1b, 2b)); _ASM_EXTABLE(1b, 2b));
__thread_fpu_end(fpu); fpregs_deactivate(fpu);
} }
fpu->fpstate_active = 0; fpu->fpstate_active = 0;

View File

@ -152,7 +152,7 @@ void fpu__save(struct fpu *fpu)
__save_fpu(fpu); __save_fpu(fpu);
} else { } else {
fpu_save_init(fpu); fpu_save_init(fpu);
__thread_fpu_end(fpu); fpregs_deactivate(fpu);
} }
} }
preempt_enable(); preempt_enable();