aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/desc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/desc.h')
-rw-r--r--include/asm-i386/desc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 494e73bca095..89b8b82c82b3 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -24,11 +24,13 @@ struct Xgt_desc_struct {
24 unsigned short pad; 24 unsigned short pad;
25} __attribute__ ((packed)); 25} __attribute__ ((packed));
26 26
27extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; 27extern struct Xgt_desc_struct idt_descr;
28DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr);
29
28 30
29static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) 31static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
30{ 32{
31 return ((struct desc_struct *)cpu_gdt_descr[cpu].address); 33 return (struct desc_struct *)per_cpu(cpu_gdt_descr, cpu).address;
32} 34}
33 35
34#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) 36#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8))