提交 a4a12e00 编写于 作者: D Dave Martin 提交者: Will Deacon

ARM: virt: Avoid bx instruction for compatibility with <=ARMv4

Non-T variants of ARMv4 do not support the bx instruction.

However, __hyp_stub_install is always called from the same
instruction set used to build the bulk of the kernel, so bx should
not be necessary.

This patch uses the traditional "mov pc" instead of bx.

Cc: <stable@vger.kernel.org>
Signed-off-by: NDave Martin <dave.martin@linaro.org>
[will: fixed up remaining bx instruction]
Signed-off-by: NWill Deacon <will.deacon@arm.com>
上级 9931faca
...@@ -99,7 +99,7 @@ ENTRY(__hyp_stub_install_secondary) ...@@ -99,7 +99,7 @@ ENTRY(__hyp_stub_install_secondary)
* immediately. * immediately.
*/ */
compare_cpu_mode_with_primary r4, r5, r6, r7 compare_cpu_mode_with_primary r4, r5, r6, r7
bxne lr movne pc, lr
/* /*
* Once we have given up on one CPU, we do not try to install the * Once we have given up on one CPU, we do not try to install the
...@@ -111,7 +111,7 @@ ENTRY(__hyp_stub_install_secondary) ...@@ -111,7 +111,7 @@ ENTRY(__hyp_stub_install_secondary)
*/ */
cmp r4, #HYP_MODE cmp r4, #HYP_MODE
bxne lr @ give up if the CPU is not in HYP mode movne pc, lr @ give up if the CPU is not in HYP mode
/* /*
* Configure HSCTLR to set correct exception endianness/instruction set * Configure HSCTLR to set correct exception endianness/instruction set
...@@ -200,7 +200,7 @@ ENDPROC(__hyp_get_vectors) ...@@ -200,7 +200,7 @@ ENDPROC(__hyp_get_vectors)
@ fall through @ fall through
ENTRY(__hyp_set_vectors) ENTRY(__hyp_set_vectors)
__HVC(0) __HVC(0)
bx lr mov pc, lr
ENDPROC(__hyp_set_vectors) ENDPROC(__hyp_set_vectors)
#ifndef ZIMAGE #ifndef ZIMAGE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册