summaryrefslogtreecommitdiff
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorLiao Chang <liaochang1@huawei.com>2022-04-08 13:09:11 +0300
committerPalmer Dabbelt <palmer@rivosinc.com>2022-05-19 22:14:18 +0300
commit6261586e0c91db14c34f894f4bc48f2300cff1d4 (patch)
tree0bac89b95a140653c0051982eaf0a9cc4743645c /arch/riscv/include
parentb7fb4d78a6ade6026d9e5cf438c2a46ab962e032 (diff)
downloadlinux-6261586e0c91db14c34f894f4bc48f2300cff1d4.tar.xz
RISC-V: Add kexec_file support
This patch adds support for kexec_file on RISC-V. I tested it on riscv64 QEMU with busybear-linux and single core along with the OpenSBI firmware fw_jump.bin for generic platform. On SMP system, it depends on CONFIG_{HOTPLUG_CPU, RISCV_SBI} to resume/stop hart through OpenSBI firmware, it also needs a OpenSBI that support the HSM extension. Signed-off-by: Liao Chang <liaochang1@huawei.com> Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com> Link: https://lore.kernel.org/r/20220408100914.150110-4-lizhengyu3@huawei.com [Palmer: Make 64-bit only] Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/kexec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/kexec.h b/arch/riscv/include/asm/kexec.h
index e4e291d40759..206217b23301 100644
--- a/arch/riscv/include/asm/kexec.h
+++ b/arch/riscv/include/asm/kexec.h
@@ -53,4 +53,8 @@ typedef void (*riscv_kexec_method)(unsigned long first_ind_entry,
extern riscv_kexec_method riscv_kexec_norelocate;
+#ifdef CONFIG_KEXEC_FILE
+extern const struct kexec_file_ops elf_kexec_ops;
+#endif
+
#endif