diff options
author | Nick Kossifidis <mick@ics.forth.gr> | 2021-04-19 03:55:36 +0300 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-04-26 08:25:21 -0700 |
commit | fba8a8674f68a0628abae470dfcfbcb4a0d7a79e (patch) | |
tree | e062971122d415840b630031d7ee59f15f2095f7 /arch/riscv/kernel/Makefile | |
parent | d83e682e301071313e390e2f5ba2f6ca2ebc1848 (diff) |
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>
Diffstat (limited to 'arch/riscv/kernel/Makefile')
-rw-r--r-- | arch/riscv/kernel/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile index 3dc0abde988a..96650aaed5eb 100644 --- a/arch/riscv/kernel/Makefile +++ b/arch/riscv/kernel/Makefile @@ -9,6 +9,10 @@ CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE) endif +ifdef CONFIG_KEXEC +AFLAGS_kexec_relocate.o := -mcmodel=medany -mno-relax +endif + extra-y += head.o extra-y += vmlinux.lds @@ -54,6 +58,7 @@ obj-$(CONFIG_SMP) += cpu_ops_sbi.o endif obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o obj-$(CONFIG_KGDB) += kgdb.o +obj-$(CONFIG_KEXEC) += kexec_relocate.o machine_kexec.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o |