Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1739704
| From | tip-bot for Ingo Molnar <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:x86/fpu] x86/fpu: Rename fpu__activate_curr() to fpu__initialize() |
| Date | 2017-09-26 10:50 +0200 |
| Message-ID | <utTJ0-2nL-17@gated-at.bofh.it> (permalink) |
| References | <usSlY-3wU-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 2ce03d850b9a2f17d55596ecfa86e72b5687a627
Gitweb: http://git.kernel.org/tip/2ce03d850b9a2f17d55596ecfa86e72b5687a627
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Sat, 23 Sep 2017 15:00:15 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 26 Sep 2017 09:43:44 +0200
x86/fpu: Rename fpu__activate_curr() to fpu__initialize()
Rename this function to better express that it's all about
initializing the FPU state of a task which goes hand in hand
with the fpu::initialized field.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Eric Biggers <ebiggers3@gmail.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>
Link: http://lkml.kernel.org/r/20170923130016.21448-33-mingo@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/fpu/internal.h | 2 +-
arch/x86/kernel/fpu/core.c | 8 ++++----
arch/x86/kernel/fpu/signal.c | 2 +-
arch/x86/kvm/x86.c | 2 +-
arch/x86/math-emu/fpu_entry.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h
index b26ae05..7c980aa 100644
--- a/arch/x86/include/asm/fpu/internal.h
+++ b/arch/x86/include/asm/fpu/internal.h
@@ -23,7 +23,7 @@
/*
* High level FPU state handling functions:
*/
-extern void fpu__activate_curr(struct fpu *fpu);
+extern void fpu__initialize(struct fpu *fpu);
extern void fpu__activate_fpstate_read(struct fpu *fpu);
extern void fpu__activate_fpstate_write(struct fpu *fpu);
extern void fpu__save(struct fpu *fpu);
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 52122dd..07db9d9 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -224,7 +224,7 @@ int fpu__copy(struct fpu *dst_fpu, struct fpu *src_fpu)
* Activate the current task's in-memory FPU context,
* if it has not been used before:
*/
-void fpu__activate_curr(struct fpu *fpu)
+void fpu__initialize(struct fpu *fpu)
{
WARN_ON_FPU(fpu != ¤t->thread.fpu);
@@ -237,7 +237,7 @@ void fpu__activate_curr(struct fpu *fpu)
fpu->initialized = 1;
}
}
-EXPORT_SYMBOL_GPL(fpu__activate_curr);
+EXPORT_SYMBOL_GPL(fpu__initialize);
/*
* This function must be called before we read a task's fpstate.
@@ -316,7 +316,7 @@ void fpu__activate_fpstate_write(struct fpu *fpu)
*/
void fpu__restore(struct fpu *fpu)
{
- fpu__activate_curr(fpu);
+ fpu__initialize(fpu);
/* Avoid __kernel_fpu_begin() right after fpregs_activate() */
kernel_fpu_disable();
@@ -392,7 +392,7 @@ void fpu__clear(struct fpu *fpu)
*/
if (static_cpu_has(X86_FEATURE_FPU)) {
preempt_disable();
- fpu__activate_curr(fpu);
+ fpu__initialize(fpu);
user_fpu_begin();
copy_init_fpstate_to_fpregs();
preempt_enable();
diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c
index ab2dd24..7fa3bdb 100644
--- a/arch/x86/kernel/fpu/signal.c
+++ b/arch/x86/kernel/fpu/signal.c
@@ -280,7 +280,7 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
if (!access_ok(VERIFY_READ, buf, size))
return -EACCES;
- fpu__activate_curr(fpu);
+ fpu__initialize(fpu);
if (!static_cpu_has(X86_FEATURE_FPU))
return fpregs_soft_set(current, NULL,
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cd17b7d..03869eb 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7225,7 +7225,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
int r;
sigset_t sigsaved;
- fpu__activate_curr(fpu);
+ fpu__initialize(fpu);
if (vcpu->sigset_active)
sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved);
diff --git a/arch/x86/math-emu/fpu_entry.c b/arch/x86/math-emu/fpu_entry.c
index d4a7df2..220638a 100644
--- a/arch/x86/math-emu/fpu_entry.c
+++ b/arch/x86/math-emu/fpu_entry.c
@@ -114,7 +114,7 @@ void math_emulate(struct math_emu_info *info)
struct desc_struct code_descriptor;
struct fpu *fpu = ¤t->thread.fpu;
- fpu__activate_curr(fpu);
+ fpu__initialize(fpu);
#ifdef RE_ENTRANT_CHECKING
if (emulating) {
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/33] x86 FPU fixes and cleanups for v4.14 Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[PATCH 19/33] x86/fpu: Decouple fpregs_activate()/fpregs_deactivate() from fpu->fpregs_active Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Decouple fpregs_activate()/fpregs_deactivate() from fpu->fpregs_active tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 15/33] x86/fpu: Simplify fpu->fpregs_active use Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Simplify fpu->fpregs_active use tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 26/33] x86/fpu: Reinitialize FPU registers if restoring FPU state fails Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Reinitialize FPU registers if restoring FPU state fails tip-bot for Eric Biggers <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 32/33] x86/fpu: Rename fpu__activate_curr() to fpu__initialize() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Rename fpu__activate_curr() to fpu__initialize() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:50 +0200
[PATCH 31/33] x86/fpu: Simplify and speed up fpu__copy() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Simplify and speed up fpu__copy() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:50 +0200
[PATCH 21/33] x86/fpu: Add FPU state copying quirk to handle XRSTOR failure on Intel Skylake CPUs Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Add FPU state copying quirk to handle XRSTOR failure on Intel Skylake CPUs tip-bot for Rik van Riel <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 13/33] x86/fpu: Remove 'kbuf' parameter from the copy_user_to_xstate() API Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Remove 'kbuf' parameter from the copy_user_to_xstate() API tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 33/33] x86/fpu: Rename fpu__activate_fpstate_read/write() to fpu__read/write() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[PATCH 02/33] x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:30 +0200
[PATCH 16/33] x86/fpu: Make the fpu state change in fpu__clear() scheduler-atomic Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Make the fpu state change in fpu__clear() scheduler-atomic tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 14/33] x86/fpu: Flip the parameter order in copy_*_to_xstate() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Flip the parameter order in copy_*_to_xstate() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 11/33] x86/fpu: Split copy_user_to_xstate() into copy_kernel_to_xstate() & copy_user_to_xstate() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Split copy_user_to_xstate() into copy_kernel_to_xstate() & copy_user_to_xstate() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 07/33] x86/fpu: Remove the 'start_pos' parameter from the __copy_xstate_to_*() functions Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Remove the 'start_pos' parameter from the __copy_xstate_to_*() functions tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 01/33] x86/fpu: Rename copyin_to_xsaves()/copyout_from_xsaves() to copy_user_to_xstate()/copy_xstate_to_user() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Rename copyin_to_xsaves()/copyout_from_xsaves() to copy_user_to_xstate()/copy_xstate_to_user() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:30 +0200
[PATCH 29/33] x86/fpu: Rename fpu::fpstate_active to fpu::initialized Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Rename fpu::fpstate_active to fpu::initialized tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:50 +0200
[PATCH 17/33] x86/fpu: Split the state handling in fpu__drop() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Split the state handling in fpu__drop() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 09/33] x86/fpu: Change 'size_total' parameter to unsigned and standardize the size checks in copy_xstate_to_*() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Change 'size_total' parameter to unsigned and standardize the size checks in copy_xstate_to_*() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 30/33] x86/fpu: Fix stale comments about lazy FPU logic Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Fix stale comments about lazy FPU logic tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:50 +0200
[PATCH 08/33] x86/fpu: Clarify parameter names in the copy_xstate_to_*() methods Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
Re: [PATCH 08/33] x86/fpu: Clarify parameter names in the copy_xstate_to_*() methods Thomas Gleixner <tglx@linutronix.de> - 2017-09-25 22:00 +0200
Re: [PATCH 08/33] x86/fpu: Clarify parameter names in the copy_xstate_to_*() methods Thomas Gleixner <tglx@linutronix.de> - 2017-09-25 22:10 +0200
[tip:x86/fpu] x86/fpu: Clarify parameter names in the copy_xstate_to_*() methods tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 20/33] x86/fpu: Remove struct fpu::fpregs_active Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Remove struct fpu::fpregs_active tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 03/33] x86/fpu: Remove 'ubuf' parameter from the copy_xstate_to_kernel() APIs Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Remove 'ubuf' parameter from the copy_xstate_to_kernel() APIs tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:30 +0200
[PATCH 23/33] x86/fpu: Turn WARN_ON() in context switch into WARN_ON_FPU() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Turn WARN_ON() in context switch into WARN_ON_FPU() tip-bot for Andi Kleen <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 22/33] x86/fpu: Fix boolreturn.cocci warnings Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Fix boolreturn.cocci warnings tip-bot for kbuild test robot <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 06/33] x86/fpu: Clean up the parameter definitions of copy_xstate_to_*() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Clean up the parameter definitions of copy_xstate_to_*() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 04/33] x86/fpu: Remove 'kbuf' parameter from the copy_xstate_to_user() APIs Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Remove 'kbuf' parameter from the copy_xstate_to_user() APIs tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 05/33] x86/fpu: Clean up parameter order in the copy_xstate_to_*() APIs Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Clean up parameter order in the copy_xstate_to_*() APIs tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 24/33] x86/fpu: Don't let userspace set bogus xcomp_bv Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Don't let userspace set bogus xcomp_bv tip-bot for Eric Biggers <tipbot@zytor.com> - 2017-09-26 10:50 +0200
[PATCH 18/33] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 27/33] x86/fpu: Simplify fpu__activate_fpstate_read() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Fix fpu__activate_fpstate_read() and update comments tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 12/33] x86/fpu: Remove 'ubuf' parameter from the copy_kernel_to_xstate() API Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Remove 'ubuf' parameter from the copy_kernel_to_xstate() API tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
[PATCH 25/33] x86/fpu: Tighten validation of user-supplied xstate_header Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[PATCH 28/33] x86/fpu: Remove fpu__current_fpstate_write_begin/end() Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
[tip:x86/fpu] x86/fpu: Remove fpu__current_fpstate_write_begin/end() tip-bot for Ingo Molnar <tipbot@zytor.com> - 2017-09-26 10:40 +0200
Re: [PATCH 00/33] x86 FPU fixes and cleanups for v4.14 Ingo Molnar <mingo@kernel.org> - 2017-09-23 15:10 +0200
Re: [PATCH 00/33] x86 FPU fixes and cleanups for v4.14 Juergen Gross <jgross@suse.com> - 2017-09-23 17:10 +0200
Re: [PATCH 00/33] x86 FPU fixes and cleanups for v4.14 Ingo Molnar <mingo@kernel.org> - 2017-09-24 01:30 +0200
csiph-web