Skip to content

Commit

Permalink
ARM: hyp-stub: Use r1 for the soft-restart address
Browse files Browse the repository at this point in the history
It is not really obvious why the restart address should be in r3
when communicated to the hyp-stub. r1 should be perfectly adequate,
and consistent with the rest of the code.

Tested-by: Keerthy <j-keerthy@ti.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
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 6b85677 commit 6b52f7b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/arm/kernel/hyp-stub.S
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ __hyp_stub_do_trap:

1: teq r0, #HVC_SOFT_RESTART
bne 1f
bx r3
bx r1

1: mov r0, #-1

Expand Down Expand Up @@ -258,10 +258,9 @@ ENTRY(__hyp_set_vectors)
ENDPROC(__hyp_set_vectors)

ENTRY(__hyp_soft_restart)
mov r3, r0
mov r1, r0
mov r0, #HVC_SOFT_RESTART
__HVC(0)
mov r0, r3
ret lr
ENDPROC(__hyp_soft_restart)

Expand Down

0 comments on commit 6b52f7b

Please sign in to comment.