From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-next@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-sh@vger.kernel.org, x86@kernel.org,
akpm@linux-foundation.org, eric_devolder@yahoo.com,
sfr@canb.auug.org.au, ignat@cloudflare.com,
Baoquan He <bhe@redhat.com>, kernel test robot <lkp@intel.com>
Subject: [PATCH 1/5] loongarch, kexec: change dependency of object files
Date: Fri, 8 Dec 2023 15:30:32 +0800 [thread overview]
Message-ID: <20231208073036.7884-2-bhe@redhat.com> (raw)
In-Reply-To: <20231208073036.7884-1-bhe@redhat.com>
Currently, in arch/loongarch/kernel/Makefile, building machine_kexec.o
relocate_kernel.o depends on CONFIG_KEXEC.
Whereas, since we will drop the select of KEXEC for CRASH_DUMP in
kernel/Kconfig.kexec, compiling error will be triggered if below config
items are set:
===
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
CONFIG_CRASH_DUMP=y
===
---------------------------------------------------------------
loongarch64-linux-ld: kernel/kexec_core.o: in function `.L209':
>> kexec_core.c:(.text+0x1660): undefined reference to `machine_kexec_cleanup'
loongarch64-linux-ld: kernel/kexec_core.o: in function `.L287':
>> kexec_core.c:(.text+0x1c5c): undefined reference to `machine_crash_shutdown'
>> loongarch64-linux-ld: kexec_core.c:(.text+0x1c64): undefined reference to `machine_kexec'
loongarch64-linux-ld: kernel/kexec_core.o: in function `.L2^B5':
>> kexec_core.c:(.text+0x2090): undefined reference to `machine_shutdown'
loongarch64-linux-ld: kexec_core.c:(.text+0x20a0): undefined reference to `machine_kexec'
---------------------------------------------------------------
Here, changing the dependency of machine_kexec.o relocate_kernel.o to
CONFIG_KEXEC_CORE can fix above building error.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311300946.kHE9Iu71-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/loongarch/kernel/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/loongarch/kernel/Makefile b/arch/loongarch/kernel/Makefile
index 4fcc168f0732..3c808c680370 100644
--- a/arch/loongarch/kernel/Makefile
+++ b/arch/loongarch/kernel/Makefile
@@ -57,7 +57,7 @@ obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o
obj-$(CONFIG_RELOCATABLE) += relocate.o
-obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
+obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o
--
2.41.0
next prev parent reply other threads:[~2023-12-08 7:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 7:30 [PATCH 0/5] kexec: fix the incorrect ifdeffery and dependency of CONFIG_KEXEC Baoquan He
2023-12-08 7:30 ` Baoquan He [this message]
2023-12-08 7:30 ` [PATCH 2/5] m68k, kexec: fix the incorrect ifdeffery and build " Baoquan He
2023-12-08 7:30 ` [PATCH 3/5] mips, kexec: fix the incorrect ifdeffery and " Baoquan He
2023-12-08 7:30 ` [PATCH 4/5] sh, " Baoquan He
2023-12-08 7:30 ` [PATCH 5/5] x86, kexec: fix the wrong ifdeffery CONFIG_KEXEC Baoquan He
2023-12-08 7:42 ` [PATCH 0/5] kexec: fix the incorrect ifdeffery and dependency of CONFIG_KEXEC Baoquan He
2023-12-11 8:25 ` Geert Uytterhoeven
2023-12-11 9:10 ` Baoquan He
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=20231208073036.7884-2-bhe@redhat.com \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=eric_devolder@yahoo.com \
--cc=ignat@cloudflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=lkp@intel.com \
--cc=loongarch@lists.linux.dev \
--cc=sfr@canb.auug.org.au \
--cc=x86@kernel.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).