[U-Boot] arm: mach-keystone: Fixes issue with return values in inline assembly

Tom Rini trini at konsulko.com
Wed Jul 26 19:50:59 UTC 2017


On Mon, Jul 17, 2017 at 01:02:02PM -0500, Andrew F. Davis wrote:

> From: "Srinivas, Madan" <madans at ti.com>
> 
> 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 at ti.com>
> Reviewed-by: Tom Rini <trini at konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170726/b4be02a3/attachment.sig>


More information about the U-Boot mailing list