x86: cpu/common*.c, merge switch_to_new_gdt()
authorYinghai Lu <yhlu.kernel@gmail.com>
Fri, 5 Sep 2008 03:09:05 +0000 (20:09 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 5 Sep 2008 07:40:50 +0000 (09:40 +0200)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/common_64.c

index f44678db16162ccb7e1b84d8ed24521e644cd0d9..43d5287bb2a466bf90a04b73dff056b1cc8b8bc8 100644 (file)
@@ -215,7 +215,9 @@ void switch_to_new_gdt(void)
        gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
        gdt_descr.size = GDT_SIZE - 1;
        load_gdt(&gdt_descr);
+#ifdef CONFIG_X86_32
        asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory");
+#endif
 }
 
 static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
index 2bd0ed5abb0a608d2fcd8afac8010255ddb9d8c9..d7b996518f865144a0a97bdf53f786956a3a7495 100644 (file)
@@ -214,6 +214,9 @@ void switch_to_new_gdt(void)
        gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
        gdt_descr.size = GDT_SIZE - 1;
        load_gdt(&gdt_descr);
+#ifdef CONFIG_X86_32
+       asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory");
+#endif
 }
 
 static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};