diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:15:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:15:58 -0400 |
commit | e765ee90da62535ac7d7a97f2464f9646539d683 (patch) | |
tree | 7a9cecce5aab958938e9a3bf46c2302d6af1958c /arch/x86/kernel/process_32.c | |
parent | a4500b84c51645bbc86be3ca84f2252b7ada060f (diff) | |
parent | 066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff) |
Merge branch 'linus' into tracing/ftrace
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 5 |
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 | /* |