Skip to content

Commit 9bb0036

Browse files
mrutland-armwildea01
authored andcommitted
arm64: head.S: avoid open-coded adr_l
Some places in the kernel open-code sequences using ADRP for a symbol another instruction using a :lo12: relocation for that same symbol. These sequences are easy to get wrong, and more painful to read than is necessary. For these reasons, it is preferable to use the {adr,ldr,str}_l macros for these cases. This patch makes use of adr_l these in head.S, removing an open-coded sequence using adrp. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 9a80243 commit 9bb0036

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/arm64/kernel/head.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,7 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems
613613

614614
install_el2_stub:
615615
/* Hypervisor stub */
616-
adrp x0, __hyp_stub_vectors
617-
add x0, x0, #:lo12:__hyp_stub_vectors
616+
adr_l x0, __hyp_stub_vectors
618617
msr vbar_el2, x0
619618

620619
/* spsr */

0 commit comments

Comments
 (0)