Skip to content

Commit 526d10a

Browse files
mrutland-armwildea01
authored andcommitted
arm64: efi-entry.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 these in efi-entry.S, removing open-coded sequences 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: Matt Fleming <matt@codeblueprint.co.uk> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 9bb0036 commit 526d10a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

arch/arm64/kernel/efi-entry.S

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ ENTRY(entry)
4646
* efi_system_table_t *sys_table,
4747
* unsigned long *image_addr) ;
4848
*/
49-
adrp x8, _text
50-
add x8, x8, #:lo12:_text
49+
adr_l x8, _text
5150
add x2, sp, 16
5251
str x8, [x2]
5352
bl efi_entry
@@ -68,10 +67,8 @@ ENTRY(entry)
6867
/*
6968
* Calculate size of the kernel Image (same for original and copy).
7069
*/
71-
adrp x1, _text
72-
add x1, x1, #:lo12:_text
73-
adrp x2, _edata
74-
add x2, x2, #:lo12:_edata
70+
adr_l x1, _text
71+
adr_l x2, _edata
7572
sub x1, x2, x1
7673

7774
/*

0 commit comments

Comments
 (0)