aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.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_64.c
parenta4500b84c51645bbc86be3ca84f2252b7ada060f (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Merge branch 'linus' into tracing/ftrace
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r--arch/x86/kernel/process_64.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index dd349c92f051..dc534f40c8d3 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -661,8 +661,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
661 /* If the task has used fpu the last 5 timeslices, just do a full 661 /* If the task has used fpu the last 5 timeslices, just do a full
662 * restore of the math state immediately to avoid the trap; the 662 * restore of the math state immediately to avoid the trap; the
663 * chances of needing FPU soon are obviously high now 663 * chances of needing FPU soon are obviously high now
664 *
665 * tsk_used_math() checks prevent calling math_state_restore(),
666 * which can sleep in the case of !tsk_used_math()
664 */ 667 */
665 if (next_p->fpu_counter>5) 668 if (tsk_used_math(next_p) && next_p->fpu_counter > 5)
666 math_state_restore(); 669 math_state_restore();
667 return prev_p; 670 return prev_p;
668} 671}