Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4938
b: refs/heads/master
c: 2847e34
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 22, 2005
1 parent dc60bb8 commit e6d6ca0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 38afd6adf6bccd7176e88c07cac104d3639aa30d
refs/heads/master: 2847e3478c3d8119eedc3e0cb85a308b21f681dd
15 changes: 7 additions & 8 deletions trunk/include/asm-i386/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern void init_fpu(struct task_struct *);
"nop ; frstor %1", \
"fxrstor %1", \
X86_FEATURE_FXSR, \
"m" ((tsk)->thread.i387.fsave))
"m" ((tsk)->thread.i387.fxsave))

extern void kernel_fpu_begin(void);
#define kernel_fpu_end() do { stts(); preempt_enable(); } while(0)
Expand All @@ -43,13 +43,12 @@ extern void kernel_fpu_begin(void);
*/
static inline void __save_init_fpu( struct task_struct *tsk )
{
if ( cpu_has_fxsr ) {
asm volatile( "fxsave %0 ; fnclex"
: "=m" (tsk->thread.i387.fxsave) );
} else {
asm volatile( "fnsave %0 ; fwait"
: "=m" (tsk->thread.i387.fsave) );
}
alternative_input(
"fnsave %1 ; fwait ;" GENERIC_NOP2,
"fxsave %1 ; fnclex",
X86_FEATURE_FXSR,
"m" (tsk->thread.i387.fxsave)
:"memory");
tsk->thread_info->status &= ~TS_USEDFPU;
}

Expand Down

0 comments on commit e6d6ca0

Please sign in to comment.