Skip to content

Commit

Permalink
x86: cpu/common*.c, merge switch_to_new_gdt()
Browse files Browse the repository at this point in the history
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Sep 5, 2008
1 parent 1ba7658 commit fab334c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {};
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/kernel/cpu/common_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {};
Expand Down

0 comments on commit fab334c

Please sign in to comment.