]> git.baikalelectronics.ru Git - kernel.git/commit
i387: fix up some fpu_counter confusion
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Feb 2012 18:24:09 +0000 (10:24 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Feb 2012 18:24:09 +0000 (10:24 -0800)
commit8f839d3778ba0ca825231e50a106cda1d8855d12
tree86c646c0d228d1fe265536b81d86af406ff92c8e
parent321a767d01de16896a7e28edab521f81c20e6c60
i387: fix up some fpu_counter confusion

This makes sure we clear the FPU usage counter for newly created tasks,
just so that we start off in a known state (for example, don't try to
preload the FPU state on the first task switch etc).

It also fixes a thinko in when we increment the fpu_counter at task
switch time, introduced by commit d14332ea36af ("i387: re-introduce FPU
state preloading at context switch time").  We should increment the
*new* task fpu_counter, not the old task, and only if we decide to use
that state (whether lazily or preloaded).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/i387.h
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c