Skip to content

Commit

Permalink
ARM: hyp-stub: Define a return value for failed stub calls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marc Zyngier authored and Christoffer Dall committed Apr 9, 2017
1 parent cf763e4 commit 4c70cf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions arch/arm/include/asm/virt.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,6 @@ extern char __hyp_text_end[];

#endif /* __ASSEMBLY__ */

#define HVC_STUB_ERR 0xbadca11

#endif /* ! VIRT_H */
2 changes: 1 addition & 1 deletion arch/arm/kernel/hyp-stub.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c70cf0

Please sign in to comment.