diff options
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r-- | arch/i386/kernel/smpboot.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index aef39be81361..8c6c8c52b95c 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -159,7 +159,7 @@ void __init smp_alloc_memory(void) | |||
159 | * a given CPU | 159 | * a given CPU |
160 | */ | 160 | */ |
161 | 161 | ||
162 | static void __devinit smp_store_cpu_info(int id) | 162 | static void __cpuinit smp_store_cpu_info(int id) |
163 | { | 163 | { |
164 | struct cpuinfo_x86 *c = cpu_data + id; | 164 | struct cpuinfo_x86 *c = cpu_data + id; |
165 | 165 | ||
@@ -227,7 +227,7 @@ static struct { | |||
227 | atomic_t count_start; | 227 | atomic_t count_start; |
228 | atomic_t count_stop; | 228 | atomic_t count_stop; |
229 | unsigned long long values[NR_CPUS]; | 229 | unsigned long long values[NR_CPUS]; |
230 | } tsc __initdata = { | 230 | } tsc __cpuinitdata = { |
231 | .start_flag = ATOMIC_INIT(0), | 231 | .start_flag = ATOMIC_INIT(0), |
232 | .count_start = ATOMIC_INIT(0), | 232 | .count_start = ATOMIC_INIT(0), |
233 | .count_stop = ATOMIC_INIT(0), | 233 | .count_stop = ATOMIC_INIT(0), |
@@ -332,7 +332,7 @@ static void __init synchronize_tsc_bp(void) | |||
332 | printk("passed.\n"); | 332 | printk("passed.\n"); |
333 | } | 333 | } |
334 | 334 | ||
335 | static void __init synchronize_tsc_ap(void) | 335 | static void __cpuinit synchronize_tsc_ap(void) |
336 | { | 336 | { |
337 | int i; | 337 | int i; |
338 | 338 | ||
@@ -364,7 +364,7 @@ extern void calibrate_delay(void); | |||
364 | 364 | ||
365 | static atomic_t init_deasserted; | 365 | static atomic_t init_deasserted; |
366 | 366 | ||
367 | static void __devinit smp_callin(void) | 367 | static void __cpuinit smp_callin(void) |
368 | { | 368 | { |
369 | int cpuid, phys_id; | 369 | int cpuid, phys_id; |
370 | unsigned long timeout; | 370 | unsigned long timeout; |
@@ -538,7 +538,7 @@ set_cpu_sibling_map(int cpu) | |||
538 | /* | 538 | /* |
539 | * Activate a secondary processor. | 539 | * Activate a secondary processor. |
540 | */ | 540 | */ |
541 | static void __devinit start_secondary(void *unused) | 541 | static void __cpuinit start_secondary(void *unused) |
542 | { | 542 | { |
543 | /* | 543 | /* |
544 | * Don't put *anything* before secondary_cpu_init(), SMP | 544 | * Don't put *anything* before secondary_cpu_init(), SMP |
@@ -596,6 +596,12 @@ static void __devinit start_secondary(void *unused) | |||
596 | void __devinit initialize_secondary(void) | 596 | void __devinit initialize_secondary(void) |
597 | { | 597 | { |
598 | /* | 598 | /* |
599 | * switch to the per CPU GDT we already set up | ||
600 | * in do_boot_cpu() | ||
601 | */ | ||
602 | cpu_set_gdt(current_thread_info()->cpu); | ||
603 | |||
604 | /* | ||
599 | * We don't actually need to load the full TSS, | 605 | * We don't actually need to load the full TSS, |
600 | * basically just the stack pointer and the eip. | 606 | * basically just the stack pointer and the eip. |
601 | */ | 607 | */ |
@@ -931,7 +937,7 @@ static inline struct task_struct * alloc_idle_task(int cpu) | |||
931 | #define alloc_idle_task(cpu) fork_idle(cpu) | 937 | #define alloc_idle_task(cpu) fork_idle(cpu) |
932 | #endif | 938 | #endif |
933 | 939 | ||
934 | static int __devinit do_boot_cpu(int apicid, int cpu) | 940 | static int __cpuinit do_boot_cpu(int apicid, int cpu) |
935 | /* | 941 | /* |
936 | * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad | 942 | * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad |
937 | * (ie clustered apic addressing mode), this is a LOGICAL apic ID. | 943 | * (ie clustered apic addressing mode), this is a LOGICAL apic ID. |
@@ -972,9 +978,6 @@ static int __devinit do_boot_cpu(int apicid, int cpu) | |||
972 | /* Stack for startup_32 can be just as for start_secondary onwards */ | 978 | /* Stack for startup_32 can be just as for start_secondary onwards */ |
973 | stack_start.esp = (void *) idle->thread.esp; | 979 | stack_start.esp = (void *) idle->thread.esp; |
974 | 980 | ||
975 | start_pda = cpu_pda(cpu); | ||
976 | cpu_gdt_descr = per_cpu(cpu_gdt_descr, cpu); | ||
977 | |||
978 | irq_ctx_init(cpu); | 981 | irq_ctx_init(cpu); |
979 | 982 | ||
980 | x86_cpu_to_apicid[cpu] = apicid; | 983 | x86_cpu_to_apicid[cpu] = apicid; |
@@ -1432,7 +1435,7 @@ void __cpu_die(unsigned int cpu) | |||
1432 | } | 1435 | } |
1433 | #endif /* CONFIG_HOTPLUG_CPU */ | 1436 | #endif /* CONFIG_HOTPLUG_CPU */ |
1434 | 1437 | ||
1435 | int __devinit __cpu_up(unsigned int cpu) | 1438 | int __cpuinit __cpu_up(unsigned int cpu) |
1436 | { | 1439 | { |
1437 | #ifdef CONFIG_HOTPLUG_CPU | 1440 | #ifdef CONFIG_HOTPLUG_CPU |
1438 | int ret=0; | 1441 | int ret=0; |