The patch titled Subject: riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o has been added to the -mm mm-nonmm-unstable branch. Its filename is riscv-kexec-fix-the-ifdeffery-for-aflags_kexec_relocateo.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/riscv-kexec-fix-the-ifdeffery-for-aflags_kexec_relocateo.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Baoquan He <bhe@xxxxxxxxxx> Subject: riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o Date: Fri, 1 Dec 2023 14:25:38 +0800 This was introduced in commit fba8a8674f68 ("RISC-V: Add kexec support"). It should work on CONFIG_KEXEC_CORE, but not CONFIG_KEXEC only, since we could set CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=N, or only set CONFIG_CRASH_DUMP=y and disable both CONFIG_KEXEC and CONFIG_KEXEC_FILE. In these cases, the AFLAGS won't take effect with the current ifdeffery for AFLAGS_kexec_relocate.o. So fix it now. Link: https://lkml.kernel.org/r/20231201062538.27240-1-bhe@xxxxxxxxxx Signed-off-by: Baoquan He <bhe@xxxxxxxxxx> Cc: Albert Ou <aou@xxxxxxxxxxxxxxxxx> Cc: Changbin Du <changbin.du@xxxxxxxxx> Cc: Nick Kossifidis <mick@xxxxxxxxxxxx> Cc: Palmer Dabbelt <palmer@xxxxxxxxxxx> Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/riscv/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/riscv/kernel/Makefile~riscv-kexec-fix-the-ifdeffery-for-aflags_kexec_relocateo +++ a/arch/riscv/kernel/Makefile @@ -11,7 +11,7 @@ endif CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,) CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,) -ifdef CONFIG_KEXEC +ifdef CONFIG_KEXEC_CORE AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax) endif _ Patches currently in -mm which might be from bhe@xxxxxxxxxx are drivers-base-cpu-crash-data-showing-should-depends-on-kexec_core.patch kernel-kconfigkexec-drop-select-of-kexec-for-crash_dump.patch kexec_core-change-dependency-of-object-files.patch resource-add-walk_system_ram_res_rev.patch kexec_file-load-kernel-at-top-of-system-ram-if-required.patch 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