* [PATCH] riscv: kexec: build {kexec_relocate,crash_save_regs,machine_kexec}.c as kexec core files
@ 2022-06-06 3:56 Changbin Du
2022-06-06 7:13 ` lizhengyu (E)
0 siblings, 1 reply; 2+ messages in thread
From: Changbin Du @ 2022-06-06 3:56 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Changbin Du, Hui Wang, linux-riscv, linux-kernel, changbin.du
This fixes below linking errors when building with CONFIG_KEXEC_FILE=y &&
CONFIG_KEXEC=n. The {kexec_relocate,crash_save_regs,machine_kexec}.c should
be core kexec source files.
riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `kimage_free':
/home/changbin/work/linux-riscv/kernel/kexec_core.c:651: undefined reference to `machine_kexec_cleanup'
riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `__crash_kexec':
/home/changbin/work/linux-riscv/kernel/kexec_core.c:981: undefined reference to `machine_crash_shutdown'
riscv64-linux-gnu-ld: /home/changbin/work/linux-riscv/kernel/kexec_core.c:982: undefined reference to `machine_kexec'
riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `crash_setup_regs':
/home/changbin/work/linux-riscv/./arch/riscv/include/asm/kexec.h:35: undefined reference to `riscv_crash_save_regs'
riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `kernel_kexec':
/home/changbin/work/linux-riscv/kernel/kexec_core.c:1200: undefined reference to `machine_shutdown'
riscv64-linux-gnu-ld: /home/changbin/work/linux-riscv/kernel/kexec_core.c:1204: undefined reference to `machine_kexec'
riscv64-linux-gnu-ld: kernel/kexec_file.o: in function `__do_sys_kexec_file_load':
/home/changbin/work/linux-riscv/kernel/kexec_file.c:363: undefined reference to `machine_kexec_prepare'
riscv64-linux-gnu-ld: /home/changbin/work/linux-riscv/kernel/kexec_file.c:363: undefined reference to `machine_kexec_prepare'
make: *** [Makefile:1160: vmlinux] Error 1
Signed-off-by: Changbin Du <changbin.du@huawei.com>
---
arch/riscv/kernel/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index c71d6591d539..33bb60a354cd 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -78,7 +78,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 crash_save_regs.o machine_kexec.o
+obj-$(CONFIG_KEXEC_CORE) += kexec_relocate.o crash_save_regs.o machine_kexec.o
obj-$(CONFIG_KEXEC_FILE) += elf_kexec.o machine_kexec_file.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
--
2.26.2
--
Cheers,
Changbin Du
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] riscv: kexec: build {kexec_relocate,crash_save_regs,machine_kexec}.c as kexec core files
2022-06-06 3:56 [PATCH] riscv: kexec: build {kexec_relocate,crash_save_regs,machine_kexec}.c as kexec core files Changbin Du
@ 2022-06-06 7:13 ` lizhengyu (E)
0 siblings, 0 replies; 2+ messages in thread
From: lizhengyu (E) @ 2022-06-06 7:13 UTC (permalink / raw)
To: Changbin Du, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Changbin Du, Hui Wang, linux-riscv, linux-kernel
Thanks, but it has a solution already. See
https://lore.kernel.org/all/20220601070204.26882-1-lizhengyu3@huawei.com/ .
On Mon, 06 Jun 2022 11:56:35 +0800, Changbin Du <changbin.du@huawei.com>
wrote:
> This fixes below linking errors when building with CONFIG_KEXEC_FILE=y &&
> CONFIG_KEXEC=n. The {kexec_relocate,crash_save_regs,machine_kexec}.c should
> be core kexec source files.
>
> riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `kimage_free':
> /home/changbin/work/linux-riscv/kernel/kexec_core.c:651: undefined reference to `machine_kexec_cleanup'
> riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `__crash_kexec':
> /home/changbin/work/linux-riscv/kernel/kexec_core.c:981: undefined reference to `machine_crash_shutdown'
> riscv64-linux-gnu-ld: /home/changbin/work/linux-riscv/kernel/kexec_core.c:982: undefined reference to `machine_kexec'
> riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `crash_setup_regs':
> /home/changbin/work/linux-riscv/./arch/riscv/include/asm/kexec.h:35: undefined reference to `riscv_crash_save_regs'
> riscv64-linux-gnu-ld: kernel/kexec_core.o: in function `kernel_kexec':
> /home/changbin/work/linux-riscv/kernel/kexec_core.c:1200: undefined reference to `machine_shutdown'
> riscv64-linux-gnu-ld: /home/changbin/work/linux-riscv/kernel/kexec_core.c:1204: undefined reference to `machine_kexec'
> riscv64-linux-gnu-ld: kernel/kexec_file.o: in function `__do_sys_kexec_file_load':
> /home/changbin/work/linux-riscv/kernel/kexec_file.c:363: undefined reference to `machine_kexec_prepare'
> riscv64-linux-gnu-ld: /home/changbin/work/linux-riscv/kernel/kexec_file.c:363: undefined reference to `machine_kexec_prepare'
> make: *** [Makefile:1160: vmlinux] Error 1
>
> Signed-off-by: Changbin Du <changbin.du@huawei.com>
> ---
> arch/riscv/kernel/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
> index c71d6591d539..33bb60a354cd 100644
> --- a/arch/riscv/kernel/Makefile
> +++ b/arch/riscv/kernel/Makefile
> @@ -78,7 +78,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 crash_save_regs.o machine_kexec.o
> +obj-$(CONFIG_KEXEC_CORE) += kexec_relocate.o crash_save_regs.o machine_kexec.o
> obj-$(CONFIG_KEXEC_FILE) += elf_kexec.o machine_kexec_file.o
> obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-06 7:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-06 3:56 [PATCH] riscv: kexec: build {kexec_relocate,crash_save_regs,machine_kexec}.c as kexec core files Changbin Du
2022-06-06 7:13 ` lizhengyu (E)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®