x86: Move is_ia32_task to asm/thread_info.h from asm/compat.h
authorSrikar Dronamraju <[email protected]>
Tue, 13 Mar 2012 14:03:03 +0000 (19:33 +0530)
committerIngo Molnar <[email protected]>
Tue, 13 Mar 2012 15:31:09 +0000 (16:31 +0100)
is_ia32_task() is useful even in !CONFIG_COMPAT cases - utrace will
use it for example. Hence move it to a more generic file: asm/thread_info.h

Also now is_ia32_task() returns true if CONFIG_X86_32 is defined.

Signed-off-by: Srikar Dronamraju <[email protected]>
Acked-by: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Ananth N Mavinakayanahalli <[email protected]>
Cc: Jim Keniston <[email protected]>
Cc: Linux-mm <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Performed minor cleanup ]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/include/asm/compat.h
arch/x86/include/asm/thread_info.h

index 355edc0916049c9e879cee67750ec9da92eeda24..d6805798d6fc9e4cad1eedb52cd728cd51cdb8bc 100644 (file)
@@ -235,15 +235,6 @@ static inline void __user *arch_compat_alloc_user_space(long len)
        return (void __user *)round_down(sp - len, 16);
 }
 
-static inline bool is_ia32_task(void)
-{
-#ifdef CONFIG_IA32_EMULATION
-       if (current_thread_info()->status & TS_COMPAT)
-               return true;
-#endif
-       return false;
-}
-
 static inline bool is_x32_task(void)
 {
 #ifdef CONFIG_X86_X32_ABI
index af1db7e722f48d8fc982cb7f154e830b012f85b5..ad6df8ccd715881910f4bb80bc23173c8d754630 100644 (file)
@@ -266,6 +266,18 @@ static inline void set_restore_sigmask(void)
        ti->status |= TS_RESTORE_SIGMASK;
        set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
 }
+
+static inline bool is_ia32_task(void)
+{
+#ifdef CONFIG_X86_32
+       return true;
+#endif
+#ifdef CONFIG_IA32_EMULATION
+       if (current_thread_info()->status & TS_COMPAT)
+               return true;
+#endif
+       return false;
+}
 #endif /* !__ASSEMBLY__ */
 
 #ifndef __ASSEMBLY__