summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-03-09 16:09:17 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-03-21 12:23:01 +0100
commitbfe61f9031d88a94eb0f5b4bfb1e2f3154b67e98 (patch)
tree26cc0907b61f835896adc935151b6f30bb2b0ba0 /arch/arm/include
parentfff85d111de371e93b084d75d2ce39706be329c8 (diff)
downloadbarebox-bfe61f9031d88a94eb0f5b4bfb1e2f3154b67e98.tar.gz
barebox-bfe61f9031d88a94eb0f5b4bfb1e2f3154b67e98.tar.xz
ARM: aarch64: Add dummy naked attribute
The naked attribute is not supported on aarch64. To silence the compiler warning add a dummy naked attribute. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/barebox-arm.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 3aea2e070e..170839aaad 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -161,13 +161,13 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
#define ENTRY_FUNCTION(name, arg0, arg1, arg2) \
static void __##name(uint32_t, uint32_t, uint32_t); \
\
- void __naked __section(.text_head_entry_##name) name \
+ void NAKED __section(.text_head_entry_##name) name \
(uint32_t r0, uint32_t r1, uint32_t r2) \
{ \
__barebox_arm_head(); \
__##name(r0, r1, r2); \
} \
- static void __naked noinline __##name \
+ static void NAKED noinline __##name \
(uint32_t arg0, uint32_t arg1, uint32_t arg2)
/*
@@ -181,4 +181,17 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
#define barebox_image_size (__image_end - __image_start)
+#ifdef CONFIG_CPU_32
+#define NAKED __naked
+#else
+/*
+ * There is no naked support for aarch64, so do not rely on it.
+ * This basically means we must have a stack configured when a
+ * function with the naked attribute is entered. On nowadays hardware
+ * the ROM should have some basic stack already. If not, set one
+ * up before jumping into the barebox entry functions.
+ */
+#define NAKED
+#endif
+
#endif /* _BAREBOX_ARM_H_ */