diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-01-26 22:56:48 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-26 22:56:48 -0500 |
commit | b2d2f4312b117a6cc647c8521e2643a88771f757 (patch) | |
tree | cf512c6ed0cfc5081f095cfa1da974b1566bb043 /arch/x86/kernel/smpcommon.c | |
parent | 89c9c4c58ee86e6e8802597271f23679e0c46647 (diff) |
x86: initialize per-cpu GDT segment in per-cpu setup
Impact: cleanup
Rename init_gdt() to setup_percpu_segment(), and move it to
setup_percpu.c.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/smpcommon.c')
-rw-r--r-- | arch/x86/kernel/smpcommon.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/x86/kernel/smpcommon.c b/arch/x86/kernel/smpcommon.c deleted file mode 100644 index 5ec29a1a8465..000000000000 --- a/arch/x86/kernel/smpcommon.c +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * SMP stuff which is common to all sub-architectures. | ||
3 | */ | ||
4 | #include <linux/module.h> | ||
5 | #include <asm/smp.h> | ||
6 | #include <asm/sections.h> | ||
7 | |||
8 | #ifdef CONFIG_X86_32 | ||
9 | /* | ||
10 | * Initialize the CPU's GDT. This is either the boot CPU doing itself | ||
11 | * (still using the master per-cpu area), or a CPU doing it for a | ||
12 | * secondary which will soon come up. | ||
13 | */ | ||
14 | __cpuinit void init_gdt(int cpu) | ||
15 | { | ||
16 | struct desc_struct gdt; | ||
17 | |||
18 | pack_descriptor(&gdt, __per_cpu_offset[cpu], 0xFFFFF, | ||
19 | 0x2 | DESCTYPE_S, 0x8); | ||
20 | gdt.s = 1; | ||
21 | |||
22 | write_gdt_entry(get_cpu_gdt_table(cpu), | ||
23 | GDT_ENTRY_PERCPU, &gdt, DESCTYPE_S); | ||
24 | } | ||
25 | #endif | ||