Commit 6a81d7eb authored by Ingo Molnar's avatar Ingo Molnar

x86/fpu: Rename fpu__activate_fpstate() to fpu__activate_fpstate_write()

Remaining users of fpu__activate_fpstate() are all places that want to modify
FPU registers, rename the function to fpu__activate_fpstate_write() according
to this usage.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Bobby Powers <bobbypowers@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 9ba6b791
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*/ */
extern void fpu__activate_curr(struct fpu *fpu); extern void fpu__activate_curr(struct fpu *fpu);
extern void fpu__activate_fpstate_read(struct fpu *fpu); extern void fpu__activate_fpstate_read(struct fpu *fpu);
extern void fpu__activate_fpstate(struct fpu *fpu); extern void fpu__activate_fpstate_write(struct fpu *fpu);
extern void fpu__save(struct fpu *fpu); extern void fpu__save(struct fpu *fpu);
extern void fpu__restore(struct fpu *fpu); extern void fpu__restore(struct fpu *fpu);
extern int fpu__restore_sig(void __user *buf, int ia32_frame); extern int fpu__restore_sig(void __user *buf, int ia32_frame);
......
...@@ -345,7 +345,7 @@ void fpu__activate_fpstate_read(struct fpu *fpu) ...@@ -345,7 +345,7 @@ void fpu__activate_fpstate_read(struct fpu *fpu)
* the read-only case, it's not strictly necessary for * the read-only case, it's not strictly necessary for
* read-only access to the context. * read-only access to the context.
*/ */
void fpu__activate_fpstate(struct fpu *fpu) void fpu__activate_fpstate_write(struct fpu *fpu)
{ {
/* /*
* If fpregs are active (in the current CPU), then * If fpregs are active (in the current CPU), then
......
...@@ -50,7 +50,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset, ...@@ -50,7 +50,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
if (!cpu_has_fxsr) if (!cpu_has_fxsr)
return -ENODEV; return -ENODEV;
fpu__activate_fpstate(fpu); fpu__activate_fpstate_write(fpu);
fpstate_sanitize_xstate(fpu); fpstate_sanitize_xstate(fpu);
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
...@@ -111,7 +111,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset, ...@@ -111,7 +111,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset,
if (!cpu_has_xsave) if (!cpu_has_xsave)
return -ENODEV; return -ENODEV;
fpu__activate_fpstate(fpu); fpu__activate_fpstate_write(fpu);
xsave = &fpu->state.xsave; xsave = &fpu->state.xsave;
...@@ -303,7 +303,7 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset, ...@@ -303,7 +303,7 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
struct user_i387_ia32_struct env; struct user_i387_ia32_struct env;
int ret; int ret;
fpu__activate_fpstate(fpu); fpu__activate_fpstate_write(fpu);
fpstate_sanitize_xstate(fpu); fpstate_sanitize_xstate(fpu);
if (!static_cpu_has(X86_FEATURE_FPU)) if (!static_cpu_has(X86_FEATURE_FPU))
......
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