Thread (20 messages) flat view 20 messages, 8 authors, 2012-02-08
STALE5306d

Revision v1 of 4 in this series.

Revisions (4)
  1. v1 [diff vs current]
  2. v1 current
  3. v2 [diff vs current]
  4. v2 [diff vs current]

[PATCH 1/3] ARM: make arch_ret_to_user macro optional

From: nico@fluxnic.net (Nicolas Pitre)
Date: 2012-02-06 22:21:38

On Mon, 6 Feb 2012, Rob Herring wrote:
From: Rob Herring <redacted>

Only 3 platforms need arch_ret_to_user macro, so add ARCH_HAS_RET_TO_USER
kconfig option and make iop13xx, iop32x and iop33x select it.
Please make it CONFIG_NEED_RET_TO_USER instead to more clearly indicate 
why it is there.  See NEED_MACH_MEMORY_H for example.
quoted hunk ↗ jump to hunk
Signed-off-by: Rob Herring <redacted>
---
 arch/arm/Kconfig               |    6 ++++++
 arch/arm/kernel/entry-common.S |    8 +++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a48aecc..322f2ad 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -43,6 +43,9 @@ config ARM
 config ARM_HAS_SG_CHAIN
 	bool
 
+config ARCH_HAS_RET_TO_USER
+	bool
+
 config HAVE_PWM
 	bool
 
@@ -473,6 +476,7 @@ config ARCH_H720X
 config ARCH_IOP13XX
 	bool "IOP13xx-based"
 	depends on MMU
+	select ARCH_HAS_RET_TO_USER
 	select CPU_XSC3
 	select PLAT_IOP
 	select PCI
@@ -485,6 +489,7 @@ config ARCH_IOP13XX
 config ARCH_IOP32X
 	bool "IOP32x-based"
 	depends on MMU
+	select ARCH_HAS_RET_TO_USER
 	select CPU_XSCALE
 	select PLAT_IOP
 	select PCI
@@ -496,6 +501,7 @@ config ARCH_IOP32X
 config ARCH_IOP33X
 	bool "IOP33x-based"
 	depends on MMU
+	select ARCH_HAS_RET_TO_USER
 	select CPU_XSCALE
 	select PLAT_IOP
 	select PCI
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 9fd0ba9..5fe6ea8 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -10,9 +10,15 @@
 
 #include <asm/unistd.h>
 #include <asm/ftrace.h>
-#include <mach/entry-macro.S>
 #include <asm/unwind.h>
 
+#ifdef CONFIG_ARCH_HAS_RET_TO_USER
+#include <mach/entry-macro.S>
+#else
+	.macro  arch_ret_to_user, tmp1, tmp2
+	.endm
+#endif
+
 #include "entry-header.S"
 
 
-- 
1.7.5.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help