aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/smpboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r--arch/i386/kernel/smpboot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 954245f6d307..b0ad04d9ef21 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -786,13 +786,9 @@ static inline struct task_struct * alloc_idle_task(int cpu)
786 secondary which will soon come up. */ 786 secondary which will soon come up. */
787static __cpuinit void init_gdt(int cpu, struct task_struct *idle) 787static __cpuinit void init_gdt(int cpu, struct task_struct *idle)
788{ 788{
789 struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); 789 struct desc_struct *gdt = get_cpu_gdt_table(cpu);
790 struct desc_struct *gdt = per_cpu(cpu_gdt, cpu);
791 struct i386_pda *pda = &per_cpu(_cpu_pda, cpu); 790 struct i386_pda *pda = &per_cpu(_cpu_pda, cpu);
792 791
793 cpu_gdt_descr->address = (unsigned long)gdt;
794 cpu_gdt_descr->size = GDT_SIZE - 1;
795
796 pack_descriptor((u32 *)&gdt[GDT_ENTRY_PDA].a, 792 pack_descriptor((u32 *)&gdt[GDT_ENTRY_PDA].a,
797 (u32 *)&gdt[GDT_ENTRY_PDA].b, 793 (u32 *)&gdt[GDT_ENTRY_PDA].b,
798 (unsigned long)pda, sizeof(*pda) - 1, 794 (unsigned long)pda, sizeof(*pda) - 1,
@@ -1187,7 +1183,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
1187 * it's on the real one. */ 1183 * it's on the real one. */
1188static inline void switch_to_new_gdt(void) 1184static inline void switch_to_new_gdt(void)
1189{ 1185{
1190 load_gdt(&per_cpu(cpu_gdt_descr, smp_processor_id())); 1186 struct Xgt_desc_struct gdt_descr;
1187
1188 gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
1189 gdt_descr.size = GDT_SIZE - 1;
1190 load_gdt(&gdt_descr);
1191 asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_PDA) : "memory"); 1191 asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_PDA) : "memory");
1192} 1192}
1193 1193