diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2021-11-26 19:37:27 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2021-12-06 12:49:16 +0100 |
commit | 4e918ab13eaf40f19938659cb5a22c93172778a8 (patch) | |
tree | 0df6541cd53851dd56dc5a8013c29378b890d261 /arch/arm/kernel/entry-header.S | |
parent | 1fa8c4b19543ae8c8894ec92a18696c9f9b03fc8 (diff) | |
download | linux-stable-4e918ab13eaf40f19938659cb5a22c93172778a8.tar.gz linux-stable-4e918ab13eaf40f19938659cb5a22c93172778a8.tar.bz2 linux-stable-4e918ab13eaf40f19938659cb5a22c93172778a8.zip |
ARM: assembler: add optimized ldr/str macros to load variables from memory
We will be adding variable loads to various hot paths, so it makes sense
to add a helper macro that can load variables from asm code without the
use of literal pool entries. On v7 or later, we can simply use MOVW/MOVT
pairs, but on earlier cores, this requires a bit of hackery to emit a
instruction sequence that implements this using a sequence of ADD/LDR
instructions.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
Diffstat (limited to 'arch/arm/kernel/entry-header.S')
-rw-r--r-- | arch/arm/kernel/entry-header.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 81df2a3561ca..268f7f4c5c05 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -445,7 +445,7 @@ THUMB( it ne ) @ in such cases so just carry on. @ str ip, [r0, #12] @ Stash IP on the mode stack - ldr_l ip, high_memory @ Start of VMALLOC space + ldr_va ip, high_memory @ Start of VMALLOC space ARM( cmp sp, ip ) @ SP in vmalloc space? THUMB( cmp r1, ip ) THUMB( itt lo ) |