From 0aba69789452faab6f6bd7cd293489bab66352bc Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Thu, 30 Apr 2015 10:08:36 +0200 Subject: x86/fpu: Harmonize the names of the fpstate_init() helper functions Harmonize the inconsistent naming of these related functions: fpstate_init() finit_soft_fpu() => fpstate_init_fsoft() fx_finit() => fpstate_init_fxstate() fx_finit() => fpstate_init_fstate() # split out Cc: Andy Lutomirski Cc: Borislav Petkov 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 | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'arch/x86/include/asm/fpu') diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index dfdafea6e56f..0236ae6ffc26 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h @@ -28,7 +28,18 @@ extern void fpu__init_cpu_xstate(void); extern void fpu__init_system(struct cpuinfo_x86 *c); extern void fpu__activate_curr(struct fpu *fpu); + extern void fpstate_init(struct fpu *fpu); +#ifdef CONFIG_MATH_EMULATION +extern void fpstate_init_soft(struct i387_soft_struct *soft); +#else +static inline void fpstate_init_soft(struct i387_soft_struct *soft) {} +#endif +static inline void fpstate_init_fxstate(struct i387_fxsave_struct *fx) +{ + fx->cwd = 0x37f; + fx->mxcsr = MXCSR_DEFAULT; +} extern int dump_fpu(struct pt_regs *, struct user_i387_struct *); extern int fpu__exception_code(struct fpu *fpu, int trap_nr); @@ -48,12 +59,6 @@ extern void fpu__resume_cpu(void); DECLARE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx); -#ifdef CONFIG_MATH_EMULATION -extern void finit_soft_fpu(struct i387_soft_struct *soft); -#else -static inline void finit_soft_fpu(struct i387_soft_struct *soft) {} -#endif - /* * Must be run with preemption disabled: this clears the fpu_fpregs_owner_ctx, * on this CPU. @@ -93,12 +98,6 @@ static __always_inline __pure bool use_fxsr(void) return static_cpu_has_safe(X86_FEATURE_FXSR); } -static inline void fx_finit(struct i387_fxsave_struct *fx) -{ - fx->cwd = 0x37f; - fx->mxcsr = MXCSR_DEFAULT; -} - extern void fpstate_sanitize_xstate(struct fpu *fpu); #define user_insn(insn, output, input...) \ -- cgit v1.2.3