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)
commit94f536fc4fd70fc9f3c7442d09698a9b1c82f41b
tree08bdb3a12e2d168223484f80a29e6b4e8b3cf5fb
parent1a7c159a8dfa460395ee33e9ed7621a4808ac27a
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