Commit 0afc4a94 authored by Ingo Molnar's avatar Ingo Molnar

x86/fpu: Remove fpu_xsave()

It's a pointless wrapper now - use xsave_state().
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 3e261c14
...@@ -265,7 +265,7 @@ static inline void fpu_fxsave(struct fpu *fpu) ...@@ -265,7 +265,7 @@ static inline void fpu_fxsave(struct fpu *fpu)
static inline int fpu_save_init(struct fpu *fpu) static inline int fpu_save_init(struct fpu *fpu)
{ {
if (use_xsave()) { if (use_xsave()) {
fpu_xsave(fpu); xsave_state(&fpu->state->xsave);
/* /*
* xsave header may indicate the init state of the FP. * xsave header may indicate the init state of the FP.
......
...@@ -186,14 +186,6 @@ static inline int xrstor_state(struct xsave_struct *fx, u64 mask) ...@@ -186,14 +186,6 @@ static inline int xrstor_state(struct xsave_struct *fx, u64 mask)
return err; return err;
} }
/*
* Save xstate context for old process during context switch.
*/
static inline void fpu_xsave(struct fpu *fpu)
{
xsave_state(&fpu->state->xsave);
}
/* /*
* Restore xstate context for new process during context switch. * Restore xstate context for new process during context switch.
*/ */
......
...@@ -389,7 +389,7 @@ int mpx_enable_management(struct task_struct *tsk) ...@@ -389,7 +389,7 @@ int mpx_enable_management(struct task_struct *tsk)
* directory into XSAVE/XRSTOR Save Area and enable MPX through * directory into XSAVE/XRSTOR Save Area and enable MPX through
* XRSTOR instruction. * XRSTOR instruction.
* *
* fpu_xsave() is expected to be very expensive. Storing the bounds * xsave_state() is expected to be very expensive. Storing the bounds
* directory here means that we do not have to do xsave in the unmap * directory here means that we do not have to do xsave in the unmap
* path; we can just use mm->bd_addr instead. * path; we can just use mm->bd_addr instead.
*/ */
......
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