summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/i387.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@evo.osdl.org>2005-07-22 22:06:16 +0200
committerLinus Torvalds <torvalds@evo.osdl.org>2005-07-22 22:06:16 +0200
commit8ed1383fb7b6685968588141d5934e0e6715e954 (patch)
tree7ee8476ec114dbab907e3acf4e8a9d0342bf6751 /arch/i386/kernel/i387.c
parentFix up incorrect "unlikely()" on %gs reload in x86 __switch_to (diff)
downloadlinux-8ed1383fb7b6685968588141d5934e0e6715e954.tar.xz
linux-8ed1383fb7b6685968588141d5934e0e6715e954.zip
x86: make restore_fpu() use alternative assembler instructions
It's really just a single instruction, conditional on whether the CPU supports FXSR or not, so implement it as such instead of making it a function that queries FXSR dynamically. This means that the instruction just gets automatically rewritten to the correct one at boot-time.
Diffstat (limited to 'arch/i386/kernel/i387.c')
-rw-r--r--arch/i386/kernel/i387.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c
index b817168d9c62..d75524758daf 100644
--- a/arch/i386/kernel/i387.c
+++ b/arch/i386/kernel/i387.c
@@ -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.
*/