diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common_64.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index f44678db1616..43d5287bb2a4 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -215,7 +215,9 @@ void switch_to_new_gdt(void) | |||
215 | gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id()); | 215 | gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id()); |
216 | gdt_descr.size = GDT_SIZE - 1; | 216 | gdt_descr.size = GDT_SIZE - 1; |
217 | load_gdt(&gdt_descr); | 217 | load_gdt(&gdt_descr); |
218 | #ifdef CONFIG_X86_32 | ||
218 | asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory"); | 219 | asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory"); |
220 | #endif | ||
219 | } | 221 | } |
220 | 222 | ||
221 | static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; | 223 | static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; |
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c index 2bd0ed5abb0a..d7b996518f86 100644 --- a/arch/x86/kernel/cpu/common_64.c +++ b/arch/x86/kernel/cpu/common_64.c | |||
@@ -214,6 +214,9 @@ void switch_to_new_gdt(void) | |||
214 | gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id()); | 214 | gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id()); |
215 | gdt_descr.size = GDT_SIZE - 1; | 215 | gdt_descr.size = GDT_SIZE - 1; |
216 | load_gdt(&gdt_descr); | 216 | load_gdt(&gdt_descr); |
217 | #ifdef CONFIG_X86_32 | ||
218 | asm("mov %0, %%fs" : : "r" (__KERNEL_PERCPU) : "memory"); | ||
219 | #endif | ||
217 | } | 220 | } |
218 | 221 | ||
219 | static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; | 222 | static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {}; |