aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/desc_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/desc_64.h')
-rw-r--r--include/asm-x86/desc_64.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h
index 230ac6e50a0f..4d67f61b4c23 100644
--- a/include/asm-x86/desc_64.h
+++ b/include/asm-x86/desc_64.h
@@ -48,7 +48,7 @@ static inline void write_ldt_entry(struct desc_struct *ldt,
48} 48}
49 49
50/* the cpu gdt accessor */ 50/* the cpu gdt accessor */
51#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address) 51#define get_cpu_gdt_table(x) ((struct desc_struct *)cpu_gdt_descr[x].address)
52 52
53static inline void load_gdt(const struct desc_ptr *ptr) 53static inline void load_gdt(const struct desc_ptr *ptr)
54{ 54{
@@ -141,15 +141,15 @@ static inline void set_tss_desc(unsigned cpu, void *addr)
141 * -1? seg base+limit should be pointing to the address of the 141 * -1? seg base+limit should be pointing to the address of the
142 * last valid byte 142 * last valid byte
143 */ 143 */
144 set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_TSS], 144 set_tssldt_descriptor(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS],
145 (unsigned long)addr, DESC_TSS, 145 (unsigned long)addr, DESC_TSS,
146 IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1); 146 IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1);
147} 147}
148 148
149static inline void set_ldt_desc(unsigned cpu, void *addr, int size) 149static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
150{ 150{
151 set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_LDT], (unsigned long)addr, 151 set_tssldt_descriptor(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT],
152 DESC_LDT, size * 8 - 1); 152 (unsigned long)addr, DESC_LDT, size * 8 - 1);
153} 153}
154 154
155#define LDT_entry_a(info) \ 155#define LDT_entry_a(info) \
@@ -183,7 +183,7 @@ static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
183static inline void load_TLS(struct thread_struct *t, unsigned int cpu) 183static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
184{ 184{
185 unsigned int i; 185 unsigned int i;
186 u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN); 186 u64 *gdt = (u64 *)(get_cpu_gdt_table(cpu) + GDT_ENTRY_TLS_MIN);
187 187
188 for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++) 188 for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++)
189 gdt[i] = t->tls_array[i]; 189 gdt[i] = t->tls_array[i];