diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-11-09 10:19:56 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2020-11-09 10:19:56 +0000 |
commit | 2c736bb4087f2cb949cbbaf4148733131b8466dc (patch) | |
tree | cba1fd9caa5b3a57daa74f55dbb19072c677e29f /arch/arm/kernel/head-common.S | |
parent | ae73ad0527075a39122e5374504e1137c2e2d14f (diff) | |
parent | aaac3733171fca948c4fb66b78257620e3885339 (diff) |
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/kernel/head-common.S')
-rw-r--r-- | arch/arm/kernel/head-common.S | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index 4a3982812a40..9a5ab6c19568 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S @@ -170,11 +170,12 @@ ENDPROC(lookup_processor_type) * r9 = cpuid (preserved) */ __lookup_processor_type: - adr r3, __lookup_processor_type_data - ldmia r3, {r4 - r6} - sub r3, r3, r4 @ get offset between virt&phys - add r5, r5, r3 @ convert virt addresses to - add r6, r6, r3 @ physical address space + /* + * Look in <asm/procinfo.h> for information about the __proc_info + * structure. + */ + adr_l r5, __proc_info_begin + adr_l r6, __proc_info_end 1: ldmia r5, {r3, r4} @ value, mask and r4, r4, r9 @ mask wanted bits teq r3, r4 @@ -186,17 +187,6 @@ __lookup_processor_type: 2: ret lr ENDPROC(__lookup_processor_type) -/* - * Look in <asm/procinfo.h> for information about the __proc_info structure. - */ - .align 2 - .type __lookup_processor_type_data, %object -__lookup_processor_type_data: - .long . - .long __proc_info_begin - .long __proc_info_end - .size __lookup_processor_type_data, . - __lookup_processor_type_data - __error_lpae: #ifdef CONFIG_DEBUG_LL adr r0, str_lpae |