loongarch-kexec-change-dependency-of-object-files.patch removed from -mm tree
The quilt patch titled
Subject: loongarch, kexec: change dependency of object files
has been removed from the -mm tree. Its filename was
loongarch-kexec-change-dependency-of-object-files.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Baoquan He <[email protected]>
Subject: loongarch, kexec: change dependency of object files
Date: Fri, 8 Dec 2023 15:30:32 +0800
Patch series "kexec: fix the incorrect ifdeffery and dependency of CONFIG_KEXEC".
The select of KEXEC for CRASH_DUMP in kernel/Kconfig.kexec will be dropped, then compiling errors will be triggered if below config items are set:
===CONFIG_CRASH_CORE=yCONFIG_KEXEC_CORE=yCONFIG_CRASH_DUMP=y
===
E.g on mips, below link error are seen:
--------------------------------------------------------------------
mipsel-linux-ld: kernel/kexec_core.o: in function `kimage_free':
kernel/kexec_core.c:(.text+0x2200): undefined reference to `machine_kexec_cleanup'
mipsel-linux-ld: kernel/kexec_core.o: in function `__crash_kexec':
kernel/kexec_core.c:(.text+0x2480): undefined reference to `machine_crash_shutdown'
mipsel-linux-ld: kernel/kexec_core.c:(.text+0x2488): undefined reference to `machine_kexec'
mipsel-linux-ld: kernel/kexec_core.o: in function `kernel_kexec':
kernel/kexec_core.c:(.text+0x29b8): undefined reference to `machine_shutdown'
mipsel-linux-ld: kernel/kexec_core.c:(.text+0x29c0): undefined reference to `machine_kexec'
--------------------------------------------------------------------
Here, change the incorrect dependency of building kexec_core related object files, and the ifdeffery on architectures from CONFIG_KEXEC to CONFIG_KEXEC_CORE.
Testing:
========
Passed on mips and loognarch with the LKP reproducer.
This patch (of 5):
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=yCONFIG_KEXEC_CORE=yCONFIG_CRASH_DUMP=y
===
---------------------------------------------------------------
loongarch64-linux-ld: kernel/kexec_core.o: in function `.L209':
Quoted 1 line
Quoted 1 line
kexec_core.c:(.text+0x1660): undefined reference to `machine_kexec_cleanup'
loongarch64-linux-ld: kernel/kexec_core.o: in function `.L287':
Quoted 2 lines
Quoted 2 lines
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':
Quoted 1 line
Quoted 1 line
kexec_core.c:(.text+0x2090): undefined reference to `machine_shutdown'
loongarch64-linux-ld: kexec_core.c:(.text+0x20a0): undefined reference to `machine_kexec'
---------------------------------------------------------------
Here, change the dependency of machine_kexec.o relocate_kernel.o to CONFIG_KEXEC_CORE can fix above building error.
---
arch/loongarch/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/loongarch/kernel/Makefile renamed from arch/loongarch/kernel/Makefile~loongarch-kexec-change-dependency-of-object-files +1 -1
@@ -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
_
Patches currently in -mm which might be from [email protected] are
kexec_file-add-kexec_file-flag-to-control-debug-printing.patch kexec_file-print-out-debugging-message-if-required.patch kexec_file-x86-print-out-debugging-message-if-required.patch kexec_file-arm64-print-out-debugging-message-if-required.patch kexec_file-ricv-print-out-debugging-message-if-required.patch kexec_file-power-print-out-debugging-message-if-required.patch kexec_file-parisc-print-out-debugging-message-if-required.patch riscv-kexec-fix-the-ifdeffery-for-aflags_kexec_relocateo.patch