]> git.baikalelectronics.ru Git - kernel.git/commit
LoongArch: Add kexec support
authorYouling Tang <tangyouling@loongson.cn>
Wed, 12 Oct 2022 08:36:19 +0000 (16:36 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 12 Oct 2022 08:36:19 +0000 (16:36 +0800)
commit36838ff70b1cc80b5fef7ae168aa95f7d48d30e5
treeb4be8ab432c4fd77b484dbc4445de8a609444197
parent815d258474cfe7962fa84436adacecf36daf53d5
LoongArch: Add kexec support

Add three new files, kexec.h, machine_kexec.c and relocate_kernel.S to
the LoongArch architecture, so as to add support for the kexec re-boot
mechanism (CONFIG_KEXEC) on LoongArch platforms.

Kexec supports loading vmlinux.elf in ELF format and vmlinux.efi in PE
format.

I tested kexec on LoongArch machines (Loongson-3A5000) and it works as
expected:

 $ sudo kexec -l /boot/vmlinux.efi --reuse-cmdline
 $ sudo kexec -e

Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Kconfig
arch/loongarch/include/asm/kexec.h [new file with mode: 0644]
arch/loongarch/kernel/Makefile
arch/loongarch/kernel/head.S
arch/loongarch/kernel/machine_kexec.c [new file with mode: 0644]
arch/loongarch/kernel/relocate_kernel.S [new file with mode: 0644]