diff options
author | Srikar Dronamraju <srikar@linux.vnet.ibm.com> | 2012-03-13 19:33:03 +0530 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-13 16:31:09 +0100 |
commit | ef334a20d84f52407a8a2afd02ddeaecbef0ad3d (patch) | |
tree | 077494e0df360171483c68515d3763cc8afa40fe /arch/x86/include | |
parent | 51e7dc7011c99e1e5294658c7b551b92ca069985 (diff) | |
download | linux-ef334a20d84f52407a8a2afd02ddeaecbef0ad3d.tar.bz2 |
x86: Move is_ia32_task to asm/thread_info.h from asm/compat.h
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 <srikar@linux.vnet.ibm.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com>
Cc: Linux-mm <linux-mm@kvack.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120313140303.17134.1401.sendpatchset@srdronam.in.ibm.com
[ Performed minor cleanup ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/compat.h | 9 | ||||
-rw-r--r-- | arch/x86/include/asm/thread_info.h | 12 |
2 files changed, 12 insertions, 9 deletions
diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index 355edc091604..d6805798d6fc 100644 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h @@ -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 diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index af1db7e722f4..ad6df8ccd715 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -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__ |