diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-09-14 11:25:29 +0300 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-10-28 17:05:40 +0100 |
commit | 59d2f2827dfdccf8911d5e51465136b52ba623c4 (patch) | |
tree | 2f34648c07b684ddd67f3cb21d5cbfa6c53a411a /arch/arm/kernel | |
parent | 450abd38fe6c6313ce9bdd9dce81c1dd604f6fb0 (diff) | |
download | linux-59d2f2827dfdccf8911d5e51465136b52ba623c4.tar.bz2 |
ARM: head: use PC-relative insn sequence for __smp_alt
Now that calling __do_fixup_smp_on_up() can be done without passing
the physical-to-virtual offset in r3, we can replace the open coded
PC relative offset calculations with a pair of adr_l invocations. This
removes some open coded arithmetic involving virtual addresses, avoids
literal pools on v7+, and slightly reduces the footprint of the code.
Reviewed-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/head.S | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index cdc79fcee43e..5e031a0bf9a9 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -520,19 +520,11 @@ ARM_BE8(rev r0, r0) @ byteswap if big endian retne lr __fixup_smp_on_up: - adr r0, 1f - ldmia r0, {r3 - r5} - sub r3, r0, r3 - add r4, r4, r3 - add r5, r5, r3 + adr_l r4, __smpalt_begin + adr_l r5, __smpalt_end b __do_fixup_smp_on_up ENDPROC(__fixup_smp) - .align -1: .word . - .word __smpalt_begin - .word __smpalt_end - .pushsection .data .align 2 .globl smp_on_up |