From: Masahiro Yamada <masahiroy@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Li Zhengyu <lizhengyu3@huawei.com>,
palmer@rivosinc.com, mick@ics.forth.gr,
Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>,
liaochang1@huawei.com,
"open list:SIFIVE DRIVERS" <linux-riscv@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
kexec@lists.infradead.org,
Linux-Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: [PATCH] RISC-V: kexec: Fix build error without CONFIG_KEXEC
Date: Thu, 16 Jun 2022 11:21:10 +0900 [thread overview]
Message-ID: <CAK7LNASHC2nrszDgHzYE6WSAh0OD2f-6GpXTdMmc959vShF+JQ@mail.gmail.com> (raw)
In-Reply-To: <e507585a-574e-a217-479b-cb677d2df443@infradead.org>
On Thu, Jun 2, 2022 at 1:00 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 6/1/22 00:02, Li Zhengyu wrote:
> > When CONFIG_KEXEC_FILE=y but CONFIG_KEXEC is not set:
> >
> > kernel/kexec_core.o: In function `kimage_free':
> > kexec_core.c:(.text+0xa0c): undefined reference to `machine_kexec_cleanup'
> > kernel/kexec_core.o: In function `.L0 ':
> > kexec_core.c:(.text+0xde8): undefined reference to `machine_crash_shutdown'
> > kexec_core.c:(.text+0xdf4): undefined reference to `machine_kexec'
> > kernel/kexec_core.o: In function `.L231':
> > kexec_core.c:(.text+0xe1c): undefined reference to `riscv_crash_save_regs'
> > kernel/kexec_core.o: In function `.L0 ':
> > kexec_core.c:(.text+0x119e): undefined reference to `machine_shutdown'
> > kernel/kexec_core.o: In function `.L312':
> > kexec_core.c:(.text+0x11b2): undefined reference to `machine_kexec'
> > kernel/kexec_file.o: In function `.L0 ':
> > kexec_file.c:(.text+0xb84): undefined reference to `machine_kexec_prepare'
> > kernel/kexec_file.o: In function `.L177':
> > kexec_file.c:(.text+0xc5a): undefined reference to `machine_kexec_prepare'
> > Makefile:1160: recipe for target 'vmlinux' failed
> > make: *** [vmlinux] Error 1
> >
> > These symbols should depend on CONFIG_KEXEC_CORE rather than CONFIG_KEXEC
> > when kexec_file has been implemented on RISC-V, like the other archs have
> > done.
> >
> > Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Tested-by: Randy Dunlap <rdunlap@infradead.org>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
>
> thanks.
>
> > ---
> > 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
> >
>
> --
> ~Randy
Perhaps, worth this:
Fixes: 6261586e0c91 ("RISC-V: Add kexec_file support")
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
--
Best Regards
Masahiro Yamada
prev parent reply other threads:[~2022-06-16 2:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 7:02 [PATCH] RISC-V: kexec: Fix build error without CONFIG_KEXEC Li Zhengyu
2022-06-01 15:59 ` Randy Dunlap
2022-06-16 2:21 ` Masahiro Yamada [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=CAK7LNASHC2nrszDgHzYE6WSAh0OD2f-6GpXTdMmc959vShF+JQ@mail.gmail.com \
--to=masahiroy@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=ebiederm@xmission.com \
--cc=kexec@lists.infradead.org \
--cc=liaochang1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lizhengyu3@huawei.com \
--cc=mick@ics.forth.gr \
--cc=palmer@rivosinc.com \
--cc=paul.walmsley@sifive.com \
--cc=rdunlap@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).