diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-04-30 10:08:36 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 15:48:07 +0200 |
| commit | 0aba69789452faab6f6bd7cd293489bab66352bc (patch) | |
| tree | fb20629a9cbef372f44997a08eb950e15564ed20 /arch/x86/kernel/fpu/core.c | |
| parent | e1cebad49c54e0241e101ebf63d5238fe1137749 (diff) | |
| download | linux-0aba69789452faab6f6bd7cd293489bab66352bc.tar.gz linux-0aba69789452faab6f6bd7cd293489bab66352bc.tar.bz2 linux-0aba69789452faab6f6bd7cd293489bab66352bc.zip | |
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 <luto@amacapital.net>
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: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/fpu/core.c')
| -rw-r--r-- | arch/x86/kernel/fpu/core.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index 4809c32149e8..494ab4c57268 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -191,24 +191,30 @@ void fpu__save(struct fpu *fpu) } EXPORT_SYMBOL_GPL(fpu__save); +/* + * Legacy x87 fpstate state init: + */ +static inline void fpstate_init_fstate(struct i387_fsave_struct *fp) +{ + fp->cwd = 0xffff037fu; + fp->swd = 0xffff0000u; + fp->twd = 0xffffffffu; + fp->fos = 0xffff0000u; +} + void fpstate_init(struct fpu *fpu) { if (!cpu_has_fpu) { - finit_soft_fpu(&fpu->state.soft); + fpstate_init_soft(&fpu->state.soft); return; } memset(&fpu->state, 0, xstate_size); - if (cpu_has_fxsr) { - fx_finit(&fpu->state.fxsave); - } else { - struct i387_fsave_struct *fp = &fpu->state.fsave; - fp->cwd = 0xffff037fu; - fp->swd = 0xffff0000u; - fp->twd = 0xffffffffu; - fp->fos = 0xffff0000u; - } + if (cpu_has_fxsr) + fpstate_init_fxstate(&fpu->state.fxsave); + else + fpstate_init_fstate(&fpu->state.fsave); } EXPORT_SYMBOL_GPL(fpstate_init); |
