diff mbox

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

Message ID 1427105174-20072-1-git-send-email-linus.walleij@linaro.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Linus Walleij March 23, 2015, 10:06 a.m. UTC
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@linaro.org>
---
 arch/arm/lib/semihosting.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini March 28, 2015, 6:09 p.m. UTC | #1
On Mon, Mar 23, 2015 at 11:06:10AM +0100, Linus Walleij wrote:

> 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@linaro.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

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)