]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kexec: always reset to EL2 if present
authorMark Rutland <mark.rutland@arm.com>
Mon, 2 Jul 2018 13:17:53 +0000 (14:17 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 4 Jul 2018 17:34:24 +0000 (18:34 +0100)
commit91ecb2dc2e5c3bc5b1910db83df158ef6546dbe1
treeb6bc57929f74dfa86e552f92d1e614b09c33f69c
parenteb7f80cc659e7905a99e2e0c8bf2ce1fdeff604e
arm64: kexec: always reset to EL2 if present

Currently machine_kexec() doesn't reset to EL2 in the case of a
crashdump kernel. This leaves potentially dodgy state active at EL2, and
means that if the crashdump kernel attempts to online secondary CPUs,
these will be booted as mismatched ELs.

Let's reset to EL2, as we do in all other cases, and simplify things. If
EL2 state is corrupt, things are already sufficiently bad that kdump is
unlikely to work, and it's best-effort regardless.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpu-reset.h
arch/arm64/kernel/machine_kexec.c