[PATCH] x86: fix PDA variables to work during boot
[sfrench/cifs-2.6.git] / arch / i386 / kernel / smpboot.c
index dea7ef9d3e82804ea6b87089cafd88c435223113..8c6c8c52b95c0b574b837c279f84647d3b4ba867 100644 (file)
@@ -595,6 +595,12 @@ static void __cpuinit start_secondary(void *unused)
  */
 void __devinit initialize_secondary(void)
 {
+       /*
+        * switch to the per CPU GDT we already set up
+        * in do_boot_cpu()
+        */
+       cpu_set_gdt(current_thread_info()->cpu);
+
        /*
         * We don't actually need to load the full TSS,
         * basically just the stack pointer and the eip.
@@ -972,9 +978,6 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
        /* Stack for startup_32 can be just as for start_secondary onwards */
        stack_start.esp = (void *) idle->thread.esp;
 
-       start_pda = cpu_pda(cpu);
-       cpu_gdt_descr = per_cpu(cpu_gdt_descr, cpu);
-
        irq_ctx_init(cpu);
 
        x86_cpu_to_apicid[cpu] = apicid;