aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-16 05:15:58 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-16 05:15:58 -0400
commite765ee90da62535ac7d7a97f2464f9646539d683 (patch)
tree7a9cecce5aab958938e9a3bf46c2302d6af1958c /arch/x86/kernel/process_32.c
parenta4500b84c51645bbc86be3ca84f2252b7ada060f (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Merge branch 'linus' into tracing/ftrace
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r--arch/x86/kernel/process_32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index a30aa1f2607a..61f7481c31dd 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -652,8 +652,11 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
652 /* If the task has used fpu the last 5 timeslices, just do a full 652 /* If the task has used fpu the last 5 timeslices, just do a full
653 * restore of the math state immediately to avoid the trap; the 653 * restore of the math state immediately to avoid the trap; the
654 * chances of needing FPU soon are obviously high now 654 * chances of needing FPU soon are obviously high now
655 *
656 * tsk_used_math() checks prevent calling math_state_restore(),
657 * which can sleep in the case of !tsk_used_math()
655 */ 658 */
656 if (next_p->fpu_counter > 5) 659 if (tsk_used_math(next_p) && next_p->fpu_counter > 5)
657 math_state_restore(); 660 math_state_restore();
658 661
659 /* 662 /*