diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-11-09 13:19:56 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2020-11-09 13:19:56 +0300 |
commit | 2c736bb4087f2cb949cbbaf4148733131b8466dc (patch) | |
tree | cba1fd9caa5b3a57daa74f55dbb19072c677e29f /arch/arm/include | |
parent | ae73ad0527075a39122e5374504e1137c2e2d14f (diff) | |
parent | aaac3733171fca948c4fb66b78257620e3885339 (diff) | |
download | linux-2c736bb4087f2cb949cbbaf4148733131b8466dc.tar.xz |
Merge tag 'arm-adrl-replacement-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux into devel-stable
Tidy up open coded relative references in asm
Use the newly introduced adr_l/ldr_l/str_l/mov_l assembler macros to
replace open coded VA-to-PA arithmetic in various places in the code. This
avoids the use of literals on v7+ CPUs, reduces the footprint of the code
in most cases, and generally makes the code easier to follow.
Series was posted here, and reviewed by Nicolas Pitre:
https://lore.kernel.org/linux-arm-kernel/20200914095706.3985-1-ardb@kernel.org/
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/assembler.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 72627c5fb3b2..6ed30421f697 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -259,7 +259,7 @@ */ #define ALT_UP(instr...) \ .pushsection ".alt.smp.init", "a" ;\ - .long 9998b ;\ + .long 9998b - . ;\ 9997: instr ;\ .if . - 9997b == 2 ;\ nop ;\ @@ -270,7 +270,7 @@ .popsection #define ALT_UP_B(label) \ .pushsection ".alt.smp.init", "a" ;\ - .long 9998b ;\ + .long 9998b - . ;\ W(b) . + (label - 9998b) ;\ .popsection #else diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index b9241051e5cb..9e6b97286307 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h @@ -96,7 +96,7 @@ unsigned long get_wchan(struct task_struct *p); #define __ALT_SMP_ASM(smp, up) \ "9998: " smp "\n" \ " .pushsection \".alt.smp.init\", \"a\"\n" \ - " .long 9998b\n" \ + " .long 9998b - .\n" \ " " up "\n" \ " .popsection\n" #else |