Commit fab334c1 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: cpu/common*.c, merge switch_to_new_gdt()

Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1ba76586
...@@ -215,7 +215,9 @@ void switch_to_new_gdt(void) ...@@ -215,7 +215,9 @@ void switch_to_new_gdt(void)
gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id()); gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
gdt_descr.size = GDT_SIZE - 1; gdt_descr.size = GDT_SIZE - 1;
load_gdt(&gdt_descr); load_gdt(&gdt_descr);
#ifdef CONFIG_X86_32
asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory"); asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory");
#endif
} }
static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
......
...@@ -214,6 +214,9 @@ void switch_to_new_gdt(void) ...@@ -214,6 +214,9 @@ void switch_to_new_gdt(void)
gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id()); gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
gdt_descr.size = GDT_SIZE - 1; gdt_descr.size = GDT_SIZE - 1;
load_gdt(&gdt_descr); 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] = {}; static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment