linux/arch/riscv/kernel
Li Zhengyu 3a66a08759
RISC-V: kexec: Fix build error without CONFIG_KEXEC
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>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20220601070204.26882-1-lizhengyu3@huawei.com
Fixes: 6261586e0c ("RISC-V: Add kexec_file support")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-07-14 14:23:41 -07:00
..
compat_vdso riscv: compat: vdso: Add COMPAT_VDSO base code implementation 2022-04-26 13:36:53 -07:00
probes ftrace: disable preemption when recursion locked 2021-10-27 11:21:49 -04:00
vdso riscv: compat: vdso: Add COMPAT_VDSO base code implementation 2022-04-26 13:36:53 -07:00
.gitignore
alternative.c riscv: add memory-type errata for T-Head 2022-05-11 21:36:33 -07:00
asm-offsets.c RISC-V: Add arch functions for non-retentive suspend entry/exit 2022-03-10 09:29:31 -08:00
cacheinfo.c drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() 2021-09-01 10:29:10 +02:00
compat_signal.c riscv: compat: signal: Add rt_frame implementation 2022-05-17 16:37:21 -07:00
compat_syscall_table.c riscv: compat: syscall: Add compat_sys_call_table implementation 2022-04-26 13:36:25 -07:00
cpu_ops_sbi.c RISC-V: Declare per cpu boot data as static 2022-03-31 12:44:32 -07:00
cpu_ops_spinwait.c RISC-V: Use __cpu_up_stack/task_pointer only for spinwait method 2022-01-20 09:27:08 -08:00
cpu_ops.c RISC-V: Move spinwait booting method to its own config 2022-01-20 09:27:16 -08:00
cpu-hotplug.c riscv: cpu-hotplug: clear cpu from numa map when teardown 2022-02-10 09:16:50 -08:00
cpu.c riscv: Don't output a bogus mmu-type on a no MMU kernel 2022-05-21 12:20:04 -07:00
cpufeature.c riscv: drop cpufeature_apply_feature tracking variable 2022-06-16 15:47:31 -07:00
crash_dump.c vmcore: convert copy_oldmem_page() to take an iov_iter 2022-04-29 14:37:59 -07:00
crash_save_regs.S
efi-header.S
efi.c riscv: read-only pages should not be writable 2022-05-28 11:39:31 +02:00
elf_kexec.c RISCV: kexec: Fix build error without CONFIG_MODULES 2022-07-14 14:23:33 -07:00
entry.S riscv: compat: syscall: Add entry.S implementation 2022-04-26 13:36:31 -07:00
fpu.S
ftrace.c ftrace: Remove return value of ftrace_arch_modify_*() 2022-05-26 21:13:00 -04:00
head.h RISC-V: Move spinwait booting method to its own config 2022-01-20 09:27:16 -08:00
head.S riscv: Initialize thread pointer before calling C functions 2022-06-01 21:46:23 -07:00
image-vars.h
irq.c
jump_label.c
kexec_relocate.S riscv: Don't use va_pa_offset on kdump 2022-01-09 10:38:06 -08:00
kgdb.c
machine_kexec_file.c RISC-V: Add kexec_file support 2022-05-19 12:14:18 -07:00
machine_kexec.c RISC-V: use memcpy for kexec_file mode 2022-05-19 11:53:41 -07:00
Makefile RISC-V: kexec: Fix build error without CONFIG_KEXEC 2022-07-14 14:23:41 -07:00
mcount-dyn.S
mcount.S
module-sections.c
module.c riscv: implement module alternatives 2022-05-11 21:36:31 -07:00
patch.c riscv: patch_text: Fixup last cpu should be master 2022-04-22 08:29:24 -07:00
perf_callchain.c riscv: Fix fill_callchain return value 2022-03-30 23:01:42 -07:00
perf_regs.c
process.c This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
ptrace.c riscv: compat: ptrace: Add compat_arch_ptrace implement 2022-05-17 16:37:22 -07:00
reset.c riscv: Use do_kernel_power_off() 2022-05-19 19:30:30 +02:00
riscv_ksyms.c
sbi.c RISC-V: Fix IPI/RFENCE hmask on non-monotonic hartid ordering 2022-02-14 12:27:45 -08:00
setup.c RISC-V: Mark IORESOURCE_EXCLUSIVE for reserved mem instead of IORESOURCE_BUSY 2022-06-01 22:03:50 -07:00
signal.c riscv: compat: signal: Add rt_frame implementation 2022-05-17 16:37:21 -07:00
smp.c RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n 2022-01-09 12:13:31 -08:00
smpboot.c riscv: move boot alternatives to after fill_hwcap 2022-05-11 21:36:32 -07:00
soc.c
stacktrace.c riscv: Rename "sp_in_global" to "current_stack_pointer" 2022-03-30 15:15:27 -07:00
suspend_entry.S RISC-V: Split out the XIP fixups into their own file 2022-05-25 14:43:33 -07:00
suspend.c RISC-V: Add arch functions for non-retentive suspend entry/exit 2022-03-10 09:29:31 -08:00
sys_riscv.c riscv: compat: syscall: Add compat_sys_call_table implementation 2022-04-26 13:36:25 -07:00
syscall_table.c riscv/vdso: Refactor asm/vdso.h 2021-10-02 13:42:23 -07:00
time.c
trace_irq.c riscv: fix oops caused by irqsoff latency tracer 2022-02-24 20:30:30 -08:00
trace_irq.h riscv: fix oops caused by irqsoff latency tracer 2022-02-24 20:30:30 -08:00
traps_misaligned.c
traps.c riscv: integrate alternatives better into the main architecture 2022-05-11 21:36:31 -07:00
vdso.c riscv: compat: Using seperated vdso_maps for compat_vdso_info 2022-05-25 17:24:06 -07:00
vmlinux-xip.lds.S riscv: vmlinux.lds.S|vmlinux-xip.lds.S: remove .fixup section 2022-01-05 17:53:37 -08:00
vmlinux.lds.S riscv: vmlinux.lds.S|vmlinux-xip.lds.S: remove .fixup section 2022-01-05 17:53:37 -08:00