2 * SMP stuff which is common to all sub-architectures.
4 #include <linux/module.h>
6 #include <asm/sections.h>
9 DEFINE_PER_CPU(unsigned long, this_cpu_off) = (unsigned long)__per_cpu_load;
11 DEFINE_PER_CPU(unsigned long, this_cpu_off);
13 EXPORT_PER_CPU_SYMBOL(this_cpu_off);
17 * Initialize the CPU's GDT. This is either the boot CPU doing itself
18 * (still using the master per-cpu area), or a CPU doing it for a
19 * secondary which will soon come up.
21 __cpuinit void init_gdt(int cpu)
23 struct desc_struct gdt;
25 pack_descriptor(&gdt, __per_cpu_offset[cpu], 0xFFFFF,
26 0x2 | DESCTYPE_S, 0x8);
29 write_gdt_entry(get_cpu_gdt_table(cpu),
30 GDT_ENTRY_PERCPU, &gdt, DESCTYPE_S);