summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2023-12-01 14:25:38 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-12-20 15:02:57 -0800
commitd53a154cdc54b4fa2dbbf10646d613b0b664b82e (patch)
tree233ecea77b909bda99a8ab616aee688fd2c95e49 /arch
parenta78c668b9a411cbf9356cec9122ac3380016e1c6 (diff)
downloadlinux-stable-d53a154cdc54b4fa2dbbf10646d613b0b664b82e.tar.gz
linux-stable-d53a154cdc54b4fa2dbbf10646d613b0b664b82e.tar.bz2
linux-stable-d53a154cdc54b4fa2dbbf10646d613b0b664b82e.zip
riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o
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@redhat.com Signed-off-by: Baoquan He <bhe@redhat.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Changbin Du <changbin.du@intel.com> Cc: Nick Kossifidis <mick@ics.forth.gr> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/kernel/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index fee22a3d1b53..82940b6a79a2 100644
--- a/arch/riscv/kernel/Makefile
+++ b/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