Without that gcc 7.3.1 (from OSELAS.Toolchain-2018.02.0) makes
mvebu_remap_registers a standalone function which in its prolog saves
two registers to the stack. However this function is called early during
startup when there is no stack available yet and sp still points into
the nirvana which makes barebox crash.

Signed-off-by: Uwe Kleine-König <[email protected]>
---
 arch/arm/mach-mvebu/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-mvebu/common.c b/arch/arm/mach-mvebu/common.c
index 6b4fa8b889d1..5650c1ed8726 100644
--- a/arch/arm/mach-mvebu/common.c
+++ b/arch/arm/mach-mvebu/common.c
@@ -188,7 +188,7 @@ mem_initcall(mvebu_meminit);
 #define MVEBU_BRIDGE_REG_BASE          0x20000
 #define DEVICE_INTERNAL_BASE_ADDR      (MVEBU_BRIDGE_REG_BASE + 0x80)
 
-static void mvebu_remap_registers(void)
+static __always_inline void mvebu_remap_registers(void)
 {
        void __iomem *base = mvebu_get_initial_int_reg_base();
 
-- 
2.20.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to