Index: linux-2.6.15/arch/um/sys-i386/tls.c
===================================================================
--- linux-2.6.15.orig/arch/um/sys-i386/tls.c
+++ linux-2.6.15/arch/um/sys-i386/tls.c
@@ -24,23 +24,6 @@
 #include "skas.h"
 #endif
 
-#ifdef CONFIG_MODE_TT
-/* This is for use by the tracing thread in special situations (see below). */
-static int indirect_set_thread_area_tt(struct user_desc *info) {
-	BUG_ON(os_getpid() != tracing_pid);
-	return os_set_thread_area(info, current->thread.mode.tt.extern_pid);
-}
-#endif
-
-static inline int indirect_set_thread_area(struct user_desc *info) {
-#ifdef CONFIG_MODE_TT
-	if (mode_tt)
-		return indirect_set_thread_area_tt(info);
-	else
-#endif
-	BUG();
-}
-
 #ifdef CONFIG_MODE_SKAS
 int do_set_thread_area_skas(struct user_desc *info)
 {
@@ -88,8 +71,6 @@ static int get_free_idx(struct task_stru
 }
 
 #define O_FORCE 1
-//XXX: seems disappearing
-#define O_INDIRECT 2
 
 static inline void clear_user_desc(struct user_desc* info)
 {
@@ -103,15 +84,11 @@ static inline void clear_user_desc(struc
 	info->seg_not_present = 1;
 }
 
-/* O_INDIRECT is for TT mode only, and only for the tracing thread. */
 static int load_TLS(int flags, struct task_struct *to)
 {
 	int ret = 0;
 	int idx;
 
-	if (flags & O_INDIRECT)
-		BUG_ON(CHOOSE_MODE(os_getpid() != tracing_pid, 1));
-
 	for (idx = GDT_ENTRY_TLS_MIN; idx < GDT_ENTRY_TLS_MAX; idx++) {
 		struct uml_tls_struct* curr = &to->thread.arch.tls_array[idx - GDT_ENTRY_TLS_MIN];
 
@@ -136,7 +113,7 @@ static int load_TLS(int flags, struct ta
 		if (!(flags & O_FORCE) && curr->flushed)
 			continue;
 
-		ret = (flags & O_INDIRECT) ? indirect_set_thread_area(&curr->tls): do_set_thread_area(&curr->tls);
+		ret = do_set_thread_area(&curr->tls);
 		if (ret)
 			goto out;
 
@@ -192,13 +169,6 @@ void clear_flushed_tls(struct task_struc
 	}
 }
 
-/* This is called from the tracing thread. Can't be called in SKAS mode.*/
-/*static void deferred_host_tls_set(void* p)
-{
-	int* ret = (int*)p;
-	*ret = load_TLS(O_INDIRECT);
-}*/
-
 /* This in SKAS0 does not need to be used, since we have different host
  * processes. Nor will this need to be used when we'll add support to the host
  * SKAS patch. */
