]> git.baikalelectronics.ru Git - uboot.git/commit
arm: mach-keystone: Fixes issue with return values in inline assembly
authorSrinivas, Madan <madans@ti.com>
Mon, 17 Jul 2017 18:02:02 +0000 (13:02 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 26 Jul 2017 15:26:52 +0000 (11:26 -0400)
commitf0d6419b0d0564b0c4ec904745cdbbac24c3dc5c
tree08bdb3a12e2d168223484f80a29e6b4e8b3cf5fb
parent8c424d3ba7cc77aba7687ba2eaa9026458f5a2f0
arm: mach-keystone: Fixes issue with return values in inline assembly

The inline assembly functions in mon.c assume that the caller will
check for the return value in r0 according to regular ARM calling
conventions.

However, this assumption breaks down if the compiler inlines the
functions. The caller is then under no obligation to use r0 for the
result.

To fix this disconnect, we must explicitly move the return value
from the smc/bl call to the variable that the function returns.

Signed-off-by: Madan Srinivas <madans@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-keystone/mon.c