Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4898
b: refs/heads/master
c: 8ed1383
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 22, 2005
1 parent 790e0d9 commit 152ac24
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 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: b339a18b81a1f6ca1455559594f5df872b9e59f4
refs/heads/master: 8ed1383fb7b6685968588141d5934e0e6715e954
11 changes: 0 additions & 11 deletions trunk/arch/i386/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,6 @@ void kernel_fpu_begin(void)
}
EXPORT_SYMBOL_GPL(kernel_fpu_begin);

void restore_fpu( struct task_struct *tsk )
{
if ( cpu_has_fxsr ) {
asm volatile( "fxrstor %0"
: : "m" (tsk->thread.i387.fxsave) );
} else {
asm volatile( "frstor %0"
: : "m" (tsk->thread.i387.fsave) );
}
}

/*
* FPU tag word conversions.
*/
Expand Down
13 changes: 12 additions & 1 deletion trunk/include/asm-i386/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,21 @@

extern void mxcsr_feature_mask_init(void);
extern void init_fpu(struct task_struct *);

/*
* FPU lazy state save handling...
*/
extern void restore_fpu( struct task_struct *tsk );

/*
* The "nop" is needed to make the instructions the same
* length.
*/
#define restore_fpu(tsk) \
alternative_input( \
"nop ; frstor %1", \
"fxrstor %1", \
X86_FEATURE_FXSR, \
"m" ((tsk)->thread.i387.fsave))

extern void kernel_fpu_begin(void);
#define kernel_fpu_end() do { stts(); preempt_enable(); } while(0)
Expand Down

0 comments on commit 152ac24

Please sign in to comment.