Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287652
b: refs/heads/master
c: b6c6641
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Feb 16, 2012
1 parent 19c0235 commit e937426
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15d8791cae75dca27bfda8ecfe87dca9379d6bb0
refs/heads/master: b6c66418dcad0fcf83cd1d0a39482db37bf4fc41
9 changes: 6 additions & 3 deletions trunk/arch/x86/include/asm/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ static inline void fpu_save_init(struct fpu *fpu)
static inline void __save_init_fpu(struct task_struct *tsk)
{
fpu_save_init(&tsk->thread.fpu);
task_thread_info(tsk)->status &= ~TS_USEDFPU;
}

static inline int fpu_fxrstor_checking(struct fpu *fpu)
Expand Down Expand Up @@ -290,6 +289,7 @@ static inline void __unlazy_fpu(struct task_struct *tsk)
{
if (task_thread_info(tsk)->status & TS_USEDFPU) {
__save_init_fpu(tsk);
task_thread_info(tsk)->status &= ~TS_USEDFPU;
stts();
} else
tsk->fpu_counter = 0;
Expand Down Expand Up @@ -356,9 +356,11 @@ static inline void kernel_fpu_begin(void)

WARN_ON_ONCE(!irq_fpu_usable());
preempt_disable();
if (me->status & TS_USEDFPU)
if (me->status & TS_USEDFPU) {
__save_init_fpu(me->task);
else
me->status &= ~TS_USEDFPU;
/* We do 'stts()' in kernel_fpu_end() */
} else
clts();
}

Expand Down Expand Up @@ -449,6 +451,7 @@ static inline void save_init_fpu(struct task_struct *tsk)
WARN_ON_ONCE(!(task_thread_info(tsk)->status & TS_USEDFPU));
preempt_disable();
__save_init_fpu(tsk);
task_thread_info(tsk)->status &= ~TS_USEDFPU;
stts();
preempt_enable();
}
Expand Down

0 comments on commit e937426

Please sign in to comment.