summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/barebox-arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/barebox-arm.h')
-rw-r--r--arch/arm/include/asm/barebox-arm.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index d915cde294..15b3b6c444 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -190,12 +190,13 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
* Stack top of 0 means stack is already set up. In that case, the follow-up
* code block will not be inlined and may spill to stack right away.
*/
+#ifdef CONFIG_CPU_64
#define ENTRY_FUNCTION_WITHSTACK(name, stack_top, arg0, arg1, arg2) \
void name(ulong r0, ulong r1, ulong r2); \
\
static void __##name(ulong, ulong, ulong); \
\
- void NAKED __section(.text_head_entry_##name) name \
+ void __section(.text_head_entry_##name) name \
(ulong r0, ulong r1, ulong r2) \
{ \
__barebox_arm_head(); \
@@ -204,6 +205,17 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
} \
static void noinline __##name \
(ulong arg0, ulong arg1, ulong arg2)
+#else
+#define ENTRY_FUNCTION_WITHSTACK(name, stack_top, arg0, arg1, arg2) \
+ static void ____##name(ulong, ulong, ulong); \
+ ENTRY_FUNCTION(name, arg0, arg1, arg2) \
+ { \
+ __ARM_SETUP_STACK(stack_top); \
+ ____##name(arg0, arg1, arg2); \
+ } \
+ static void noinline ____##name \
+ (ulong arg0, ulong arg1, ulong arg2)
+#endif
#define ENTRY_FUNCTION(name, arg0, arg1, arg2) \