Commit 232f62cd authored by Ingo Molnar's avatar Ingo Molnar

x86/fpu: Rename __thread_fpu_begin() to fpregs_activate()

Propagate the 'fpu->fpregs_active' naming to the high level
function that sets it.
Reviewed-by: default avatarBorislav 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: default avatarIngo Molnar <mingo@kernel.org>
parent 723c58e4
...@@ -342,7 +342,7 @@ static inline void __thread_fpu_end(struct fpu *fpu) ...@@ -342,7 +342,7 @@ static inline void __thread_fpu_end(struct fpu *fpu)
stts(); stts();
} }
static inline void __thread_fpu_begin(struct fpu *fpu) static inline void fpregs_activate(struct fpu *fpu)
{ {
if (!use_eager_fpu()) if (!use_eager_fpu())
clts(); clts();
...@@ -441,7 +441,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu) ...@@ -441,7 +441,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
fpu.preload = 0; fpu.preload = 0;
else else
prefetch(new_fpu->state); prefetch(new_fpu->state);
__thread_fpu_begin(new_fpu); fpregs_activate(new_fpu);
} }
} }
return fpu; return fpu;
...@@ -499,7 +499,7 @@ static inline void user_fpu_begin(void) ...@@ -499,7 +499,7 @@ static inline void user_fpu_begin(void)
preempt_disable(); preempt_disable();
if (!user_has_fpu()) if (!user_has_fpu())
__thread_fpu_begin(fpu); fpregs_activate(fpu);
preempt_enable(); preempt_enable();
} }
......
...@@ -368,9 +368,9 @@ void fpu__restore(void) ...@@ -368,9 +368,9 @@ void fpu__restore(void)
local_irq_disable(); local_irq_disable();
} }
/* Avoid __kernel_fpu_begin() right after __thread_fpu_begin() */ /* Avoid __kernel_fpu_begin() right after fpregs_activate() */
kernel_fpu_disable(); kernel_fpu_disable();
__thread_fpu_begin(fpu); fpregs_activate(fpu);
if (unlikely(restore_fpu_checking(fpu))) { if (unlikely(restore_fpu_checking(fpu))) {
fpu_reset_state(fpu); fpu_reset_state(fpu);
force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk); force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment