summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-10-24 08:57:10 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-26 06:21:19 +0200
commiteb8006c2e04e8410763c51120ea3d9989f704ad3 (patch)
tree010e566fa0c8dd9d92391f59892f6d0469ccbdaa
parent34e8b2efc7ad373777a9ce6f847359f47e60d056 (diff)
downloadbarebox-eb8006c2e04e8410763c51120ea3d9989f704ad3.tar.gz
barebox-eb8006c2e04e8410763c51120ea3d9989f704ad3.tar.xz
ARM64: asm: define ENTRY_FUNCTION in terms of ENTRY_FUNCTION_WITHSTACK
We can't do the same for arm32, as the entry point there must be naked for proper operation, but for ARM64, ENTRY_FUNCTION(name, ...) is already equivalent to ENTRY_FUNCTION_WITHSTACK(name, 0, ...), so consolidate them. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221024065716.1215046-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/include/asm/barebox-arm.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index a34f77f2ab..47d20b6b04 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -180,6 +180,10 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
} \
static void noinline __##name \
(ulong arg0, ulong arg1, ulong arg2)
+
+#define ENTRY_FUNCTION(name, arg0, arg1, arg2) \
+ ENTRY_FUNCTION_WITHSTACK(name, 0, arg0, arg1, arg2)
+
#else
#define ENTRY_FUNCTION_WITHSTACK(name, stack_top, arg0, arg1, arg2) \
static void ____##name(ulong, ulong, ulong); \
@@ -190,8 +194,6 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
} \
static void noinline ____##name \
(ulong arg0, ulong arg1, ulong arg2)
-#endif
-
#define ENTRY_FUNCTION(name, arg0, arg1, arg2) \
void name(ulong r0, ulong r1, ulong r2); \
@@ -207,6 +209,7 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
} \
static void NAKED noinline __##name \
(ulong arg0, ulong arg1, ulong arg2)
+#endif
/*
* When using compressed images in conjunction with relocatable images