|
@@ -48,7 +48,7 @@ static inline void write_ldt_entry(struct desc_struct *ldt,
|
|
|
}
|
|
|
|
|
|
/* the cpu gdt accessor */
|
|
|
-#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address)
|
|
|
+#define get_cpu_gdt_table(x) ((struct desc_struct *)cpu_gdt_descr[x].address)
|
|
|
|
|
|
static inline void load_gdt(const struct desc_ptr *ptr)
|
|
|
{
|
|
@@ -141,15 +141,15 @@ static inline void set_tss_desc(unsigned cpu, void *addr)
|
|
|
* -1? seg base+limit should be pointing to the address of the
|
|
|
* last valid byte
|
|
|
*/
|
|
|
- set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_TSS],
|
|
|
+ set_tssldt_descriptor(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS],
|
|
|
(unsigned long)addr, DESC_TSS,
|
|
|
IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1);
|
|
|
}
|
|
|
|
|
|
static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
|
|
|
{
|
|
|
- set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_LDT], (unsigned long)addr,
|
|
|
- DESC_LDT, size * 8 - 1);
|
|
|
+ set_tssldt_descriptor(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT],
|
|
|
+ (unsigned long)addr, DESC_LDT, size * 8 - 1);
|
|
|
}
|
|
|
|
|
|
#define LDT_entry_a(info) \
|
|
@@ -183,7 +183,7 @@ static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
|
|
|
static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
|
|
|
{
|
|
|
unsigned int i;
|
|
|
- u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN);
|
|
|
+ u64 *gdt = (u64 *)(get_cpu_gdt_table(cpu) + GDT_ENTRY_TLS_MIN);
|
|
|
|
|
|
for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++)
|
|
|
gdt[i] = t->tls_array[i];
|