RISC-V: Add kexec support
authorNick Kossifidis <mick@ics.forth.gr>
Mon, 19 Apr 2021 00:55:36 +0000 (03:55 +0300)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 26 Apr 2021 15:25:21 +0000 (08:25 -0700)
commitfba8a8674f68a0628abae470dfcfbcb4a0d7a79e
treee062971122d415840b630031d7ee59f15f2095f7
parentd83e682e301071313e390e2f5ba2f6ca2ebc1848
RISC-V: Add kexec support

This patch adds support for kexec on RISC-V. On SMP systems it depends
on HOTPLUG_CPU in order to be able to bring up all harts after kexec.
It also needs a recent OpenSBI version that supports the HSM extension.
I tested it on riscv64 QEMU on both an smp and a non-smp system.

Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/kexec.h [new file with mode: 0644]
arch/riscv/kernel/Makefile
arch/riscv/kernel/kexec_relocate.S [new file with mode: 0644]
arch/riscv/kernel/machine_kexec.c [new file with mode: 0644]