diff options
Diffstat (limited to 'include/asm-i386/desc.h')
-rw-r--r-- | include/asm-i386/desc.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 29b851a18c6e..494e73bca095 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -15,9 +15,6 @@ | |||
15 | #include <asm/mmu.h> | 15 | #include <asm/mmu.h> |
16 | 16 | ||
17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; | 17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; |
18 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); | ||
19 | |||
20 | #define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) | ||
21 | 18 | ||
22 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); | 19 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); |
23 | 20 | ||
@@ -29,6 +26,11 @@ struct Xgt_desc_struct { | |||
29 | 26 | ||
30 | extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; | 27 | extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; |
31 | 28 | ||
29 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) | ||
30 | { | ||
31 | return ((struct desc_struct *)cpu_gdt_descr[cpu].address); | ||
32 | } | ||
33 | |||
32 | #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) | 34 | #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) |
33 | #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) | 35 | #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) |
34 | 36 | ||