arm64: kexec: install a copy of the linear-map
authorPasha Tatashin <pasha.tatashin@soleen.com>
Thu, 30 Sep 2021 14:31:09 +0000 (14:31 +0000)
committerWill Deacon <will@kernel.org>
Fri, 1 Oct 2021 12:31:00 +0000 (13:31 +0100)
commit3744b5280e67f54579abe92576deec0079242323
treee0a9a519d17edcebe48b5af1acecde8ab95f202c
parent19a046f07ce5a5c34ebb6432192d98cfdb38444f
arm64: kexec: install a copy of the linear-map

To perform the kexec relocation with the MMU enabled, we need a copy
of the linear map.

Create one, and install it from the relocation code. This has to be done
from the assembly code as it will be idmapped with TTBR0. The kernel
runs in TTRB1, so can't use the break-before-make sequence on the mapping
it is executing from.

The makes no difference yet as the relocation code runs with the MMU
disabled.

Suggested-by: James Morse <james.morse@arm.com>
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210930143113.1502553-12-pasha.tatashin@soleen.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/assembler.h
arch/arm64/include/asm/kexec.h
arch/arm64/kernel/asm-offsets.c
arch/arm64/kernel/hibernate-asm.S
arch/arm64/kernel/machine_kexec.c
arch/arm64/kernel/relocate_kernel.S