summaryrefslogtreecommitdiff
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2017-04-03 19:38:06 +0100
committerChristoffer Dall <cdall@linaro.org>2017-04-09 07:49:36 -0700
commitd9118c87d21ee799058a55eeae84d392ae887c91 (patch)
tree6e8afb42ef2aaec6102052e87cc76142bb065266 /arch/arm/kernel
parentaf42f20480bf13d9dbf099ccca65f3de8c44fcaf (diff)
ARM: hyp-stub: Zero r0 on successful stub handling
We now return HVC_STUB_ERR when a stub hypercall fails, but we leave whatever was in r0 on success. Zeroing it on return seems like a good idea. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/hyp-stub.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
index 918c64f17128..d8523cc47a54 100644
--- a/arch/arm/kernel/hyp-stub.S
+++ b/arch/arm/kernel/hyp-stub.S
@@ -215,8 +215,10 @@ __hyp_stub_do_trap:
beq __hyp_stub_exit
ldr r0, =HVC_STUB_ERR
+ __ERET
__hyp_stub_exit:
+ mov r0, #0
__ERET
ENDPROC(__hyp_stub_do_trap)