diff options
author | Geoff Levand <geoff@infradead.org> | 2016-06-23 19:54:48 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-06-27 17:31:25 +0200 |
commit | f9076ecfb1216a478312b1c078d04792df6d4477 (patch) | |
tree | 824d82ef044ea476fe23416b2d17e6481d6d060c /arch/arm64/kernel/hyp-stub.S | |
parent | arm64: smp: Add function to determine if cpus are stuck in the kernel (diff) | |
download | linux-f9076ecfb1216a478312b1c078d04792df6d4477.tar.xz linux-f9076ecfb1216a478312b1c078d04792df6d4477.zip |
arm64: Add back cpu reset routines
Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed the global
arm64 routines cpu_reset() and cpu_soft_restart() needed by the arm64
kexec and kdump support. Add back a simplified version of
cpu_soft_restart() with some changes needed for kexec in the new files
cpu_reset.S, and cpu_reset.h.
When a CPU is reset it needs to be put into the exception level it had when
it entered the kernel. Update cpu_soft_restart() to accept an argument
which signals if the reset address should be entered at EL1 or EL2, and
add a new hypercall HVC_SOFT_RESTART which is used for the EL2 switch.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/hyp-stub.S')
-rw-r--r-- | arch/arm64/kernel/hyp-stub.S | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S index 8727f4490772..d3b5f75e652e 100644 --- a/arch/arm64/kernel/hyp-stub.S +++ b/arch/arm64/kernel/hyp-stub.S @@ -71,8 +71,16 @@ el1_sync: msr vbar_el2, x1 b 9f +2: cmp x0, #HVC_SOFT_RESTART + b.ne 3f + mov x0, x2 + mov x2, x4 + mov x4, x1 + mov x1, x3 + br x4 // no return + /* Someone called kvm_call_hyp() against the hyp-stub... */ -2: mov x0, #ARM_EXCEPTION_HYP_GONE +3: mov x0, #ARM_EXCEPTION_HYP_GONE 9: eret ENDPROC(el1_sync) |