[U-Boot] [PATCH 1/5] armv8: semihosting: do not inline trap call

Linus Walleij linus.walleij at linaro.org
Mon Mar 23 11:06:10 CET 2015


The semihosting trap call does not like being inlined, probably
because that will mean register reordering screwing up the return
value in r0, so tag this function "noinline".

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 arch/arm/lib/semihosting.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index fd6d8573f560..d3f724b726e1 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -26,7 +26,7 @@
 /*
  * Call the handler
  */
-static long smh_trap(unsigned int sysnum, void *addr)
+static noinline long smh_trap(unsigned int sysnum, void *addr)
 {
 	register long result asm("r0");
 #if defined(CONFIG_ARM64)
-- 
1.9.3



More information about the U-Boot mailing list