diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index 18a62239c73d..0292fcc4d441 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h @@ -335,13 +335,6 @@ static inline void __fpregs_activate(struct fpu *fpu) * These generally need preemption protection to work, * do try to avoid using these on their own. */ -static inline void __thread_fpu_end(struct fpu *fpu) -{ - __fpregs_deactivate(fpu); - if (!use_eager_fpu()) - stts(); -} - static inline void fpregs_activate(struct fpu *fpu) { if (!use_eager_fpu()) @@ -349,6 +342,13 @@ static inline void fpregs_activate(struct fpu *fpu) __fpregs_activate(fpu); } +static inline void fpregs_deactivate(struct fpu *fpu) +{ + __fpregs_deactivate(fpu); + if (!use_eager_fpu()) + stts(); +} + static inline void drop_fpu(struct fpu *fpu) { /* @@ -362,7 +362,7 @@ static inline void drop_fpu(struct fpu *fpu) asm volatile("1: fwait\n" "2:\n" _ASM_EXTABLE(1b, 2b)); - __thread_fpu_end(fpu); + fpregs_deactivate(fpu); } fpu->fpstate_active = 0; diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index a1768ec8e643..3d2ec4bd7f8c 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -152,7 +152,7 @@ void fpu__save(struct fpu *fpu) __save_fpu(fpu); } else { fpu_save_init(fpu); - __thread_fpu_end(fpu); + fpregs_deactivate(fpu); } } preempt_enable();