patch-2.1.125 linux/arch/i386/kernel/smp.c

Next file: linux/arch/i386/lib/delay.c
Previous file: linux/arch/i386/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.124/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
@@ -736,7 +736,6 @@
 	/*  Must be done before calibration delay is computed  */
 	mtrr_init_secondary_cpu ();
 #endif
-	stts();
 	smp_callin();
 	while (!smp_commenced)
 		barrier();
@@ -753,6 +752,13 @@
 	struct thread_struct * p = &current->tss;
 
 	/*
+	 * Load up the LDT and the task register.
+	 */
+	asm volatile("lldt %%ax": :"a" (p->ldt));
+	asm volatile("ltr %%ax": :"a" (p->tr));
+	stts();
+
+	/*
 	 * We don't actually need to load the full TSS,
 	 * basically just the stack pointer and the eip.
 	 *
@@ -760,8 +766,7 @@
 	 * to release it as part of the "reschedule" return.
 	 */
 	spin_lock(&scheduler_lock);
-	asm volatile("lldt %%ax": :"a" (p->ldt));
-	asm volatile("ltr %%ax": :"a" (p->tr));
+
 	asm volatile(
 		"movl %0,%%esp\n\t"
 		"jmp *%1"

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov