x86/fpu: Move restore_init_xstate() out of fpu/internal.h

Move restore_init_xstate() next to its sole caller.

Also rename it to copy_init_fpstate_to_fpregs() and add
some comments about what it does.

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 11:21:59 +02:00
parent 6f57502310
commit 815418890e
2 changed files with 13 additions and 9 deletions

View File

@@ -341,14 +341,6 @@ static inline void fpregs_deactivate(struct fpu *fpu)
__fpregs_deactivate_hw();
}
static inline void restore_init_xstate(void)
{
if (use_xsave())
xrstor_state(&init_fpstate.xsave, -1);
else
fxrstor_checking(&init_fpstate.fxsave);
}
/*
* Definitions for the eXtended Control Register instructions
*/