From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757444Ab2CMQSl (ORCPT ); Tue, 13 Mar 2012 12:18:41 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41716 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753833Ab2CMQSj (ORCPT ); Tue, 13 Mar 2012 12:18:39 -0400 Date: Tue, 13 Mar 2012 09:16:55 -0700 From: tip-bot for Srikar Dronamraju Message-ID: Cc: mingo@redhat.com, torvalds@linux-foundation.org, peterz@infradead.org, rostedt@goodmis.org, jkenisto@linux.vnet.ibm.com, tglx@linutronix.de, oleg@redhat.com, linux-mm@kvack.org, hpa@zytor.com, linux-kernel@vger.kernel.org, andi@firstfloor.org, hch@infradead.org, ananth@in.ibm.com, masami.hiramatsu.pt@hitachi.com, acme@infradead.org, srikar@linux.vnet.ibm.com, mingo@elte.hu Reply-To: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, andi@firstfloor.org, torvalds@linux-foundation.org, peterz@infradead.org, hch@infradead.org, ananth@in.ibm.com, masami.hiramatsu.pt@hitachi.com, acme@infradead.org, rostedt@goodmis.org, jkenisto@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com, tglx@linutronix.de, oleg@redhat.com, linux-mm@kvack.org, mingo@elte.hu In-Reply-To: <20120313140303.17134.1401.sendpatchset@srdronam.in.ibm.com> References: <20120313140303.17134.1401.sendpatchset@srdronam.in.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/uprobes] x86: Move is_ia32_task to asm/thread_info. h from asm/compat.h Git-Commit-ID: ef334a20d84f52407a8a2afd02ddeaecbef0ad3d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Tue, 13 Mar 2012 09:17:02 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ef334a20d84f52407a8a2afd02ddeaecbef0ad3d Gitweb: http://git.kernel.org/tip/ef334a20d84f52407a8a2afd02ddeaecbef0ad3d Author: Srikar Dronamraju AuthorDate: Tue, 13 Mar 2012 19:33:03 +0530 Committer: Ingo Molnar CommitDate: Tue, 13 Mar 2012 16:31:09 +0100 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 Acked-by: H. Peter Anvin Cc: Linus Torvalds Cc: Ananth N Mavinakayanahalli Cc: Jim Keniston Cc: Linux-mm Cc: Oleg Nesterov Cc: Andi Kleen Cc: Christoph Hellwig Cc: Steven Rostedt Cc: Arnaldo Carvalho de Melo Cc: Masami Hiramatsu Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20120313140303.17134.1401.sendpatchset@srdronam.in.ibm.com [ Performed minor cleanup ] Signed-off-by: Ingo Molnar --- arch/x86/include/asm/compat.h | 9 --------- 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 355edc0..d680579 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 af1db7e..ad6df8c 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__