From cba330b1cde4c0ee7159dae3df3001514ebb544c Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Thu, 4 Sep 2008 20:09:05 -0700 Subject: [PATCH] --- yaml --- r: 112817 b: refs/heads/master c: fab334c1d5f24d23d12f98ad652d399279cd03ce h: refs/heads/master i: 112815: cbed35eed02d57ca63f40b9e678798e3b0e545a1 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/cpu/common.c | 2 ++ trunk/arch/x86/kernel/cpu/common_64.c | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5862c3d69e58..d6bddcfc12eb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1ba76586f778be327e452180d8378e40ee70f066 +refs/heads/master: fab334c1d5f24d23d12f98ad652d399279cd03ce diff --git a/trunk/arch/x86/kernel/cpu/common.c b/trunk/arch/x86/kernel/cpu/common.c index f44678db1616..43d5287bb2a4 100644 --- a/trunk/arch/x86/kernel/cpu/common.c +++ b/trunk/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/trunk/arch/x86/kernel/cpu/common_64.c b/trunk/arch/x86/kernel/cpu/common_64.c index 2bd0ed5abb0a..d7b996518f86 100644 --- a/trunk/arch/x86/kernel/cpu/common_64.c +++ b/trunk/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] = {};