All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] x86: Move is_ia32_task to asm/thread_info.h from asm/compat.h
@ 2012-03-13 14:03 ` Srikar Dronamraju
  0 siblings, 0 replies; 10+ messages in thread
From: Srikar Dronamraju @ 2012-03-13 14:03 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: Andrew Morton, Linus Torvalds, Ananth N Mavinakayanahalli,
	Jim Keniston, LKML, Linux-mm, Oleg Nesterov, Andi Kleen,
	Christoph Hellwig, Steven Rostedt, Arnaldo Carvalho de Melo,
	Masami Hiramatsu, Thomas Gleixner

From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

is_ia32_task is useful even in !CONFIG_COMPAT cases. 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>
---
 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..130fd4e 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
+#if defined CONFIG_X86_64 && defined CONFIG_IA32_EMULATION
+	if (current_thread_info()->status & TS_COMPAT)
+		return true;
+#endif
+	return false;
+}
 #endif	/* !__ASSEMBLY__ */
 
 #ifndef __ASSEMBLY__


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-13 18:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-13 14:03 [PATCH 1/2] x86: Move is_ia32_task to asm/thread_info.h from asm/compat.h Srikar Dronamraju
2012-03-13 14:03 ` Srikar Dronamraju
2012-03-13 14:03 ` [PATCH 2/2] uprobes/core: Handle breakpoint and singlestep exception Srikar Dronamraju
2012-03-13 14:03   ` Srikar Dronamraju
2012-03-13 15:35   ` Ingo Molnar
2012-03-13 15:35     ` Ingo Molnar
2012-03-13 18:05     ` Srikar Dronamraju
2012-03-13 18:05       ` Srikar Dronamraju
2012-03-13 16:16 ` [tip:perf/uprobes] x86: Move is_ia32_task to asm/thread_info. h from asm/compat.h tip-bot for Srikar Dronamraju
2012-03-13 16:16   ` tip-bot for Srikar Dronamraju

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.