ARM: hyp-stub: Define a return value for failed stub calls
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 3 Apr 2017 18:37:51 +0000 (19:37 +0100)
committerChristoffer Dall <cdall@linaro.org>
Sun, 9 Apr 2017 14:49:27 +0000 (07:49 -0700)
Define a standard return value to be returned when a hyp stub
call fails.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
arch/arm/include/asm/virt.h
arch/arm/kernel/hyp-stub.S

index 4ea16fcaf2edc149f4910325a1c2a7b522c1d36b..c16f70d6953f1c66d72ae1422629900f4dd78207 100644 (file)
@@ -104,4 +104,6 @@ extern char __hyp_text_end[];
 
 #endif /* __ASSEMBLY__ */
 
+#define HVC_STUB_ERR   0xbadca11
+
 #endif /* ! VIRT_H */
index 15eaa14322a70d7d7eb0f13a1e3df11232c28166..b20ca88159115fc6637654ac0f7f76a1959d6d12 100644 (file)
@@ -216,7 +216,7 @@ __hyp_stub_do_trap:
        bne     1f
        bx      r1
 
-1:     mov     r0, #-1
+1:     ldr     r0, =HVC_STUB_ERR
 
 __hyp_stub_exit:
        __ERET