aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2005-02-22 23:30:56 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2005-02-22 23:30:56 +0000
commit594ca1303769fb8096a0eafdf7b14ef8116d870a (patch)
tree0fe460824b5edeca825cc3248bb53be25c49c69b
parent9c8f91343008a9358c3bc96aa9412f7a12a56834 (diff)
downloadxen-594ca1303769fb8096a0eafdf7b14ef8116d870a.tar.gz
xen-594ca1303769fb8096a0eafdf7b14ef8116d870a.tar.bz2
xen-594ca1303769fb8096a0eafdf7b14ef8116d870a.zip
bitkeeper revision 1.1159.258.8 (421bc0b0jvILWAafCXfC9uUwrkZb3A)
Clean up task-switch path. Now differs more from native code, but it is a critical path. Also fixed a comment and FPU TS setting. Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c
index 5eaf9e384c..26dee14c3a 100644
--- a/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c
+++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c
@@ -481,11 +481,8 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
/*
- * We clobber FS and GS here so that we avoid a GPF when
- * restoring previous task's FS/GS values in Xen when the LDT
- * is switched. If we don't do this then we can end up
- * erroneously re-flushing the page-update queue when we
- * 'execute_multicall_list'.
+ * We clobber FS and GS here so that we avoid a GPF when restoring
+ * previous task's FS/GS values in Xen when the LDT is switched.
*/
__asm__ __volatile__ (
"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs" : : :
@@ -501,7 +498,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
* synchronously trapping to Xen.
*/
if (prev_p->thread_info->status & TS_USEDFPU) {
- save_init_fpu(prev_p);
+ __save_init_fpu(prev_p); /* _not_ save_init_fpu() */
queue_multicall0(__HYPERVISOR_fpu_taskswitch);
}
@@ -510,12 +507,6 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
* This is load_esp0(tss, next) with a multicall.
*/
tss->esp0 = next->esp0;
- /* This can only happen when SEP is enabled, no need to test
- * "SEP"arately */
- if (unlikely(tss->ss1 != next->sysenter_cs)) {
- tss->ss1 = next->sysenter_cs;
- wrmsr(MSR_IA32_SYSENTER_CS, next->sysenter_cs, 0);
- }
queue_multicall2(__HYPERVISOR_stack_switch, tss->ss0, tss->esp0);
/*
@@ -549,7 +540,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
/*
* Restore %fs and %gs if needed.
*/
- if (unlikely(prev->fs | prev->gs | next->fs | next->gs)) {
+ if (unlikely(next->fs | next->gs)) {
loadsegment(fs, next->fs);
loadsegment(gs, next->gs);
}