diff options
author | Remi Denis-Courmont <remi.denis.courmont@huawei.com> | 2020-03-04 11:36:31 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2020-03-24 11:48:24 +0000 |
commit | dc374b477f9233296bf2da31854e486e1781169e (patch) | |
tree | a61ee700139111432d262ab6e071f822f59d9c1d /arch/arm64/kernel/relocate_kernel.S | |
parent | 9a25136a61179fe79689abf3c3fc67f89ce9ec13 (diff) | |
download | linux-dc374b477f9233296bf2da31854e486e1781169e.tar.gz linux-dc374b477f9233296bf2da31854e486e1781169e.tar.bz2 linux-dc374b477f9233296bf2da31854e486e1781169e.zip |
arm64: use mov_q instead of literal ldr
In practice, this requires only 2 instructions, or even only 1 for
the idmap_pg_dir size (with 4 or 64 KiB pages). Only the MAIR values
needed more than 2 instructions and it was already converted to mov_q
by 95b3f74bec203804658e17f86fe20755bb8abcb9.
Signed-off-by: Remi Denis-Courmont <remi.denis.courmont@huawei.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'arch/arm64/kernel/relocate_kernel.S')
-rw-r--r-- | arch/arm64/kernel/relocate_kernel.S | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/kernel/relocate_kernel.S b/arch/arm64/kernel/relocate_kernel.S index c1d7db71a726..c40ce496c78b 100644 --- a/arch/arm64/kernel/relocate_kernel.S +++ b/arch/arm64/kernel/relocate_kernel.S @@ -41,7 +41,7 @@ ENTRY(arm64_relocate_new_kernel) cmp x0, #CurrentEL_EL2 b.ne 1f mrs x0, sctlr_el2 - ldr x1, =SCTLR_ELx_FLAGS + mov_q x1, SCTLR_ELx_FLAGS bic x0, x0, x1 pre_disable_mmu_workaround msr sctlr_el2, x0 @@ -113,8 +113,6 @@ ENTRY(arm64_relocate_new_kernel) ENDPROC(arm64_relocate_new_kernel) -.ltorg - .align 3 /* To keep the 64-bit values below naturally aligned. */ .Lcopy_end: |