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>
This commit is contained in:
Ingo Molnar
2015-04-30 10:08:36 +02:00
vanhempi e1cebad49c
commit 0aba697894
4 muutettua tiedostoa jossa 30 lisäystä ja 25 poistoa

Näytä tiedosto

@@ -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);

Näytä tiedosto

@@ -121,7 +121,7 @@ static void fpu__init_system_generic(void)
* Set up the legacy init FPU context. (xstate init might overwrite this
* with a more modern format, if the CPU supports it.)
*/
fx_finit(&init_xstate_ctx.i387);
fpstate_init_fxstate(&init_xstate_ctx.i387);
fpu__init_system_mxcsr();
}