From: "lizhengyu (E)" <lizhengyu3@huawei.com>
To: Changbin Du <changbin.du@huawei.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>
Cc: Changbin Du <changbin.du@gmail.com>,
Hui Wang <hw.huiwang@huawei.com>,
<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] riscv: kexec: build {kexec_relocate,crash_save_regs,machine_kexec}.c as kexec core files
Date: Mon, 6 Jun 2022 15:13:07 +0800 [thread overview]
Message-ID: <56da43f4-605f-4d89-af7a-cdc7bc429f94@huawei.com> (raw)
In-Reply-To: <20220606035635.o52ja3bjpru3fqcf@M910t>
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
>
prev parent reply other threads:[~2022-06-06 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 3:56 Changbin Du
2022-06-06 7:13 ` lizhengyu (E) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56da43f4-605f-4d89-af7a-cdc7bc429f94@huawei.com \
--to=lizhengyu3@huawei.com \
--cc=aou@eecs.berkeley.edu \
--cc=changbin.du@gmail.com \
--cc=changbin.du@huawei.com \
--cc=hw.huiwang@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®