summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-09-04 20:09:05 -0700
committerIngo Molnar <mingo@elte.hu>2008-09-05 09:40:50 +0200
commitfab334c1d5f24d23d12f98ad652d399279cd03ce (patch)
tree8533620fceedb5cbabdcc9c28e2e810ff12cc4db /arch
parent1ba76586f778be327e452180d8378e40ee70f066 (diff)
downloadop-kernel-dev-fab334c1d5f24d23d12f98ad652d399279cd03ce.zip
op-kernel-dev-fab334c1d5f24d23d12f98ad652d399279cd03ce.tar.gz
x86: cpu/common*.c, merge switch_to_new_gdt()
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/common.c2
-rw-r--r--arch/x86/kernel/cpu/common_64.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index f44678d..43d5287 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)
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] = {};
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c
index 2bd0ed5..d7b9965 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)
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] = {};
OpenPOWER on IntegriCloud