aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/head_32.S2
-rw-r--r--arch/x86/kernel/smpboot.c25
2 files changed, 2 insertions, 25 deletions
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index ffb73a5b609f..f67e93441caf 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -452,7 +452,7 @@ is386: movl $2,%ecx # set MP
452 je 1f 452 je 1f
453 movl $(__KERNEL_PERCPU), %eax 453 movl $(__KERNEL_PERCPU), %eax
454 movl %eax,%fs # set this cpu's percpu 454 movl %eax,%fs # set this cpu's percpu
455 jmp initialize_secondary # all other CPUs call initialize_secondary 455 movl (stack_start), %esp
4561: 4561:
457#endif /* CONFIG_SMP */ 457#endif /* CONFIG_SMP */
458 jmp *(initial_code) 458 jmp *(initial_code)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index fe2bd515d6cc..2a0d39f3f2f1 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -349,28 +349,6 @@ static void __cpuinit start_secondary(void *unused)
349 cpu_idle(); 349 cpu_idle();
350} 350}
351 351
352#ifdef CONFIG_X86_32
353/*
354 * Everything has been set up for the secondary
355 * CPUs - they just need to reload everything
356 * from the task structure
357 * This function must not return.
358 */
359void __devinit initialize_secondary(void)
360{
361 /*
362 * We don't actually need to load the full TSS,
363 * basically just the stack pointer and the ip.
364 */
365
366 asm volatile(
367 "movl %0,%%esp\n\t"
368 "jmp *%1"
369 :
370 :"m" (current->thread.sp), "m" (current->thread.ip));
371}
372#endif
373
374static void __cpuinit smp_apply_quirks(struct cpuinfo_x86 *c) 352static void __cpuinit smp_apply_quirks(struct cpuinfo_x86 *c)
375{ 353{
376#ifdef CONFIG_X86_32 354#ifdef CONFIG_X86_32
@@ -892,16 +870,15 @@ do_rest:
892#ifdef CONFIG_X86_32 870#ifdef CONFIG_X86_32
893 per_cpu(current_task, cpu) = c_idle.idle; 871 per_cpu(current_task, cpu) = c_idle.idle;
894 init_gdt(cpu); 872 init_gdt(cpu);
895 c_idle.idle->thread.ip = (unsigned long) start_secondary;
896 /* Stack for startup_32 can be just as for start_secondary onwards */ 873 /* Stack for startup_32 can be just as for start_secondary onwards */
897 irq_ctx_init(cpu); 874 irq_ctx_init(cpu);
898#else 875#else
899 cpu_pda(cpu)->pcurrent = c_idle.idle; 876 cpu_pda(cpu)->pcurrent = c_idle.idle;
900 load_sp0(&per_cpu(init_tss, cpu), &c_idle.idle->thread); 877 load_sp0(&per_cpu(init_tss, cpu), &c_idle.idle->thread);
901 initial_code = (unsigned long)start_secondary;
902 clear_tsk_thread_flag(c_idle.idle, TIF_FORK); 878 clear_tsk_thread_flag(c_idle.idle, TIF_FORK);
903#endif 879#endif
904 early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); 880 early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu);
881 initial_code = (unsigned long)start_secondary;
905 stack_start.sp = (void *) c_idle.idle->thread.sp; 882 stack_start.sp = (void *) c_idle.idle->thread.sp;
906 883
907 /* start_ip had better be page-aligned! */ 884 /* start_ip had better be page-aligned! */