From 0afc4a941c0e7b8f6f619fe576f7c5ddbe78d304 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 22 Apr 2015 15:14:44 +0200 Subject: [PATCH] x86/fpu: Remove fpu_xsave() It's a pointless wrapper now - use xsave_state(). Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86/include/asm/fpu-internal.h | 2 +- arch/x86/include/asm/xsave.h | 8 -------- arch/x86/mm/mpx.c | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index b1f5dd63cfeb..95e04cb1ed2f 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -265,7 +265,7 @@ static inline void fpu_fxsave(struct fpu *fpu) static inline int fpu_save_init(struct fpu *fpu) { if (use_xsave()) { - fpu_xsave(fpu); + xsave_state(&fpu->state->xsave); /* * xsave header may indicate the init state of the FP. diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h index 61c951ce77fe..7c90ea93c54e 100644 --- a/arch/x86/include/asm/xsave.h +++ b/arch/x86/include/asm/xsave.h @@ -186,14 +186,6 @@ static inline int xrstor_state(struct xsave_struct *fx, u64 mask) 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. */ diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index 37ad432e7f16..412b5f81e547 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c @@ -389,7 +389,7 @@ int mpx_enable_management(struct task_struct *tsk) * directory into XSAVE/XRSTOR Save Area and enable MPX through * 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 * path; we can just use mm->bd_addr instead. */ -- 2.34.1