x86: Move is_ia32_task to asm/thread_info.h from asm/compat.h
[~shefty/rdma-dev.git] / arch / x86 / include / asm / thread_info.h
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__