aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorGravatar Pasha Tatashin <pasha.tatashin@soleen.com> 2021-09-30 14:31:07 +0000
committerGravatar Will Deacon <will@kernel.org> 2021-10-01 13:31:00 +0100
commitba959fe96a1bbb98765762da20ecb3a6eb9c9d39 (patch)
treec43ad3d51524e52e34d11398c0f0881e424ea055 /arch/arm64/kernel/machine_kexec.c
parentarm64: kexec: configure EL2 vectors for kexec (diff)
downloadlinux-ba959fe96a1bbb98765762da20ecb3a6eb9c9d39.tar.gz
linux-ba959fe96a1bbb98765762da20ecb3a6eb9c9d39.tar.bz2
linux-ba959fe96a1bbb98765762da20ecb3a6eb9c9d39.zip
arm64: kexec: relocate in EL1 mode
Since we are going to keep MMU enabled during relocation, we need to keep EL1 mode throughout the relocation. Keep EL1 enabled, and switch EL2 only before entering the new world. 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-10-pasha.tatashin@soleen.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/machine_kexec.c')
-rw-r--r--arch/arm64/kernel/machine_kexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c
index 59a4b4172b68..cf5d6f22a041 100644
--- a/arch/arm64/kernel/machine_kexec.c
+++ b/arch/arm64/kernel/machine_kexec.c
@@ -240,8 +240,8 @@ void machine_kexec(struct kimage *kimage)
} else {
if (is_hyp_nvhe())
__hyp_set_vectors(kimage->arch.el2_vectors);
- cpu_soft_restart(kimage->arch.kern_reloc, virt_to_phys(kimage),
- 0, 0);
+ cpu_soft_restart(kimage->arch.kern_reloc,
+ virt_to_phys(kimage), 0, 0);
}
BUG(); /* Should never get here. */