diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:24:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-16 05:24:00 -0400 |
commit | 6d72b7952fa7d7c61d021398970c29afde6a4443 (patch) | |
tree | 31c00be8e2837e2db2e62c694421a93a9f4c79d7 /arch/x86/kernel/process_64.c | |
parent | 6360b1fbb4a939efd34fc770c2ebd927c55506e0 (diff) | |
parent | 066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff) |
Merge branch 'linus' into core/rodata
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 e2319f39988b..ac54ff56df80 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -658,8 +658,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
658 | /* If the task has used fpu the last 5 timeslices, just do a full | 658 | /* If the task has used fpu the last 5 timeslices, just do a full |
659 | * restore of the math state immediately to avoid the trap; the | 659 | * restore of the math state immediately to avoid the trap; the |
660 | * chances of needing FPU soon are obviously high now | 660 | * chances of needing FPU soon are obviously high now |
661 | * | ||
662 | * tsk_used_math() checks prevent calling math_state_restore(), | ||
663 | * which can sleep in the case of !tsk_used_math() | ||
661 | */ | 664 | */ |
662 | if (next_p->fpu_counter>5) | 665 | if (tsk_used_math(next_p) && next_p->fpu_counter > 5) |
663 | math_state_restore(); | 666 | math_state_restore(); |
664 | return prev_p; | 667 | return prev_p; |
665 | } | 668 | } |