git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i387: re-introduce FPU state preloading at context switch time
[pandora-kernel.git]
/
arch
/
x86
/
kernel
/
process_64.c
diff --git
a/arch/x86/kernel/process_64.c
b/arch/x86/kernel/process_64.c
index
753e803
..
1fd94bc
100644
(file)
--- a/
arch/x86/kernel/process_64.c
+++ b/
arch/x86/kernel/process_64.c
@@
-386,8
+386,9
@@
__switch_to(struct task_struct *prev_p, struct task_struct *next_p)
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
unsigned fsindex, gsindex;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
unsigned fsindex, gsindex;
+ fpu_switch_t fpu;
-
__unlazy_fpu(prev
_p);
+
fpu = switch_fpu_prepare(prev_p, next
_p);
/*
* Reload esp0, LDT and the page table pointer:
/*
* Reload esp0, LDT and the page table pointer:
@@
-457,6
+458,8
@@
__switch_to(struct task_struct *prev_p, struct task_struct *next_p)
wrmsrl(MSR_KERNEL_GS_BASE, next->gs);
prev->gsindex = gsindex;
wrmsrl(MSR_KERNEL_GS_BASE, next->gs);
prev->gsindex = gsindex;
+ switch_fpu_finish(next_p, fpu);
+
/*
* Switch the PDA and FPU contexts.
*/
/*
* Switch the PDA and FPU contexts.
*/