arm64: entry: simplify trampoline data page
authorArd Biesheuvel <ardb@kernel.org>
Wed, 22 Jun 2022 16:10:10 +0000 (18:10 +0200)
committerWill Deacon <will@kernel.org>
Fri, 24 Jun 2022 12:08:30 +0000 (13:08 +0100)
commit1c9a8e87680870d5daf1eaa6314373dcc156ac15
tree7795f36f44351c6debfe7fc04d840d31ba3c9502
parent47546a1912fc4a037035746998c3cfa740beed70
arm64: entry: simplify trampoline data page

Get rid of some clunky open coded arithmetic on section addresses, by
emitting the trampoline data variables into a separate, dedicated r/o
data section, and putting it at the next page boundary. This way, we can
access the literals via single LDR instruction.

While at it, get rid of other, implicit literals, and use ADRP/ADD or
MOVZ/MOVK sequences, as appropriate. Note that the latter are only
supported for CONFIG_RELOCATABLE=n (which is usually the case if
CONFIG_RANDOMIZE_BASE=n), so update the CPP conditionals to reflect
this.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220622161010.3845775-1-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/fixmap.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/mm/mmu.c