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

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:30:59 +02:00
parent 66ddc2cb0f
commit 11f2d50b10
2 changed files with 8 additions and 6 deletions

View File

@@ -116,7 +116,7 @@ void __kernel_fpu_end(void)
struct fpu *fpu = &me->thread.fpu;
if (fpu->has_fpu) {
if (WARN_ON(restore_fpu_checking(me)))
if (WARN_ON(restore_fpu_checking(fpu)))
fpu_reset_state(me);
} else if (!use_eager_fpu()) {
stts();
@@ -370,7 +370,7 @@ void fpu__restore(void)
/* Avoid __kernel_fpu_begin() right after __thread_fpu_begin() */
kernel_fpu_disable();
__thread_fpu_begin(fpu);
if (unlikely(restore_fpu_checking(tsk))) {
if (unlikely(restore_fpu_checking(fpu))) {
fpu_reset_state(tsk);
force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
} else {