[PATCH 5/9] ARM64: <asm/barebox-arm-head.h>: mark prologue location

Ahmad Fatoum a.fatoum at pengutronix.de
Sun Nov 7 23:52:05 PST 2021


Unlike with ARM32, barebox prologue on ARM64 starts with the function
prologue, because of the absence of the naked attribute. The code is
written with that in mind (6 branches instead of 8 to account for the
two instructions inserted by the compiler), but it's still suprising.

Add a hint about that in the code.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 arch/arm/include/asm/barebox-arm-head.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
index 8409a77d2e7c..187d12c9fc8d 100644
--- a/arch/arm/include/asm/barebox-arm-head.h
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -44,6 +44,8 @@ static inline void __barebox_arm_head(void)
 		"1: b 1b\n"
 #endif
 #else
+		/* two instruction long function prologue */
+		/* only use if stack is initialized! */
 		"b 2f\n"
 		"nop\n"
 		"nop\n"
-- 
2.30.2




More information about the barebox mailing list