aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/fpu-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/fpu-internal.h')
-rw-r--r--arch/x86/include/asm/fpu-internal.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
index 4d0bda7b11e3..c49a613c6452 100644
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -365,7 +365,7 @@ static inline void drop_fpu(struct task_struct *tsk)
365 * Forget coprocessor state.. 365 * Forget coprocessor state..
366 */ 366 */
367 preempt_disable(); 367 preempt_disable();
368 tsk->fpu_counter = 0; 368 tsk->thread.fpu_counter = 0;
369 __drop_fpu(tsk); 369 __drop_fpu(tsk);
370 clear_used_math(); 370 clear_used_math();
371 preempt_enable(); 371 preempt_enable();
@@ -424,7 +424,7 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta
424 * or if the past 5 consecutive context-switches used math. 424 * or if the past 5 consecutive context-switches used math.
425 */ 425 */
426 fpu.preload = tsk_used_math(new) && (use_eager_fpu() || 426 fpu.preload = tsk_used_math(new) && (use_eager_fpu() ||
427 new->fpu_counter > 5); 427 new->thread.fpu_counter > 5);
428 if (__thread_has_fpu(old)) { 428 if (__thread_has_fpu(old)) {
429 if (!__save_init_fpu(old)) 429 if (!__save_init_fpu(old))
430 cpu = ~0; 430 cpu = ~0;
@@ -433,16 +433,16 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta
433 433
434 /* Don't change CR0.TS if we just switch! */ 434 /* Don't change CR0.TS if we just switch! */
435 if (fpu.preload) { 435 if (fpu.preload) {
436 new->fpu_counter++; 436 new->thread.fpu_counter++;
437 __thread_set_has_fpu(new); 437 __thread_set_has_fpu(new);
438 prefetch(new->thread.fpu.state); 438 prefetch(new->thread.fpu.state);
439 } else if (!use_eager_fpu()) 439 } else if (!use_eager_fpu())
440 stts(); 440 stts();
441 } else { 441 } else {
442 old->fpu_counter = 0; 442 old->thread.fpu_counter = 0;
443 old->thread.fpu.last_cpu = ~0; 443 old->thread.fpu.last_cpu = ~0;
444 if (fpu.preload) { 444 if (fpu.preload) {
445 new->fpu_counter++; 445 new->thread.fpu_counter++;
446 if (!use_eager_fpu() && fpu_lazy_restore(new, cpu)) 446 if (!use_eager_fpu() && fpu_lazy_restore(new, cpu))
447 fpu.preload = 0; 447 fpu.preload = 0;
448 else 448 else