|
|
@@ -251,7 +251,8 @@ static inline void native_load_tls(struct thread_struct *t, unsigned int cpu)
|
|
|
gdt[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i];
|
|
|
}
|
|
|
|
|
|
-#define _LDT_empty(info) \
|
|
|
+/* This intentionally ignores lm, since 32-bit apps don't have that field. */
|
|
|
+#define LDT_empty(info) \
|
|
|
((info)->base_addr == 0 && \
|
|
|
(info)->limit == 0 && \
|
|
|
(info)->contents == 0 && \
|
|
|
@@ -261,12 +262,6 @@ static inline void native_load_tls(struct thread_struct *t, unsigned int cpu)
|
|
|
(info)->seg_not_present == 1 && \
|
|
|
(info)->useable == 0)
|
|
|
|
|
|
-#ifdef CONFIG_X86_64
|
|
|
-#define LDT_empty(info) (_LDT_empty(info) && ((info)->lm == 0))
|
|
|
-#else
|
|
|
-#define LDT_empty(info) (_LDT_empty(info))
|
|
|
-#endif
|
|
|
-
|
|
|
static inline void clear_LDT(void)
|
|
|
{
|
|
|
set_ldt(NULL, 0);
|