diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-16 11:17:19 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-16 11:17:19 +0200 |
commit | ed9e4996d9a123b7550e63713d563f524fa9d9f0 (patch) | |
tree | a9be05d357b407aac80118b86f25d21a5dbdfc88 /arch/x86/kernel/process_64.c | |
parent | 4d2df795f0c3eb91f97a666f47716121a2f166ed (diff) | |
parent | 066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff) |
Merge branch 'linus' into tracing/sysproftip-tracing-sysprof-2008-06-16_09.17_Mon
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r-- | arch/x86/kernel/process_64.c | 5 |
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) /* If the task has used fpu the last 5 timeslices, just do a full * restore of the math state immediately to avoid the trap; the * chances of needing FPU soon are obviously high now + * + * tsk_used_math() checks prevent calling math_state_restore(), + * which can sleep in the case of !tsk_used_math() */ - if (next_p->fpu_counter>5) + if (tsk_used_math(next_p) && next_p->fpu_counter > 5) math_state_restore(); return prev_p; } |