diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-05-28 12:01:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:48:18 -0400 |
commit | 3e9704739daf46a8ba6593d749c67b5f7cd633d2 (patch) | |
tree | f023ae0d0c9090b8cd2e478c487fdd2ff4275eb8 /arch/x86/kernel/smpboot.c | |
parent | e3f77edfc1d0beb7b10f9f31d9e39206f7dbef7b (diff) |
x86: boot secondary cpus through initial_code
remove "initialize_secondary". Boot both architectures via
initial_code.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 25 |
1 files changed, 1 insertions, 24 deletions
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 | */ | ||
359 | void __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 | |||
374 | static void __cpuinit smp_apply_quirks(struct cpuinfo_x86 *c) | 352 | static 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! */ |