x86/fpu: Use 'struct fpu' in fpu__save()

Migrate this function to pure 'struct fpu' usage.

Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
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-23 17:57:24 +02:00
parent a4d8fc2e06
commit 0c070595ce
3 changed files with 5 additions and 7 deletions

View File

@@ -142,11 +142,9 @@ static void __save_fpu(struct fpu *fpu)
*
* This only ever gets called for the current task.
*/
void fpu__save(struct task_struct *tsk)
void fpu__save(struct fpu *fpu)
{
struct fpu *fpu = &tsk->thread.fpu;
WARN_ON(tsk != current);
WARN_ON(fpu != &current->thread.fpu);
preempt_disable();
if (fpu->has_fpu) {
@@ -240,7 +238,7 @@ static void fpu_copy(struct task_struct *dst, struct task_struct *src)
memset(&dst->thread.fpu.state->xsave, 0, xstate_size);
__save_fpu(dst_fpu);
} else {
fpu__save(src);
fpu__save(src_fpu);
memcpy(dst_fpu->state, src_fpu->state, xstate_size);
}
}