linux/arch/riscv/kernel
Ignat Korchagin c41bd25141 kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP
In commit f8ff23429c62 ("kernel/Kconfig.kexec: drop select of KEXEC for
CRASH_DUMP") we tried to fix a config regression, where CONFIG_CRASH_DUMP
required CONFIG_KEXEC.

However, it was not enough at least for arm64 platforms.  While further
testing the patch with our arm64 config I noticed that CONFIG_CRASH_DUMP
is unavailable in menuconfig.  This is because CONFIG_CRASH_DUMP still
depends on the new CONFIG_ARCH_SUPPORTS_KEXEC introduced in commit
91506f7e5d ("arm64/kexec: refactor for kernel/Kconfig.kexec") and on
arm64 CONFIG_ARCH_SUPPORTS_KEXEC requires CONFIG_PM_SLEEP_SMP=y, which in
turn requires either CONFIG_SUSPEND=y or CONFIG_HIBERNATION=y neither of
which are set in our config.

Given that we already established that CONFIG_KEXEC (which is a switch for
kexec system call itself) is not required for CONFIG_CRASH_DUMP drop
CONFIG_ARCH_SUPPORTS_KEXEC dependency as well.  The arm64 kernel builds
just fine with CONFIG_CRASH_DUMP=y and with both CONFIG_KEXEC=n and
CONFIG_KEXEC_FILE=n after f8ff23429c62 ("kernel/Kconfig.kexec: drop select
of KEXEC for CRASH_DUMP") and this patch are applied given that the
necessary shared bits are included via CONFIG_KEXEC_CORE dependency.

[bhe@redhat.com: don't export some symbols when CONFIG_MMU=n]
  Link: https://lkml.kernel.org/r/ZW03ODUKGGhP1ZGU@MiWiFi-R3L-srv
[bhe@redhat.com: riscv, kexec: fix dependency of two items]
  Link: https://lkml.kernel.org/r/ZW04G/SKnhbE5mnX@MiWiFi-R3L-srv
Link: https://lkml.kernel.org/r/20231129220409.55006-1-ignat@cloudflare.com
Fixes: 91506f7e5d ("arm64/kexec: refactor for kernel/Kconfig.kexec")
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: <stable@vger.kernel.org> # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
Cc: <stable@vger.kernel.org> # 6.6+
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-12-12 17:20:16 -08:00
..
compat_vdso kbuild: unify vdso_install rules 2023-10-28 21:09:02 +09:00
pi riscv: Introduce virtual kernel mapping KASLR 2023-09-05 19:49:27 -07:00
probes riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
tests riscv: Add tests for riscv module loading 2023-11-07 14:59:32 -08:00
vdso RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
.gitignore
acpi.c RISC-V: ACPI: Enhance acpi_os_ioremap with MMIO remapping 2023-10-26 09:40:31 -07:00
alternative.c Merge patch series "Add non-coherent DMA support for AX45MP" 2023-09-08 11:24:34 -07:00
asm-offsets.c riscv: Implement Shadow Call Stack 2023-10-27 14:43:08 -07:00
cacheinfo.c RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
cfi.c riscv: Add CFI error handling 2023-08-23 14:16:39 -07:00
compat_signal.c
compat_syscall_table.c riscv: Implement syscall wrappers 2023-08-23 14:16:36 -07:00
copy-unaligned.h RISC-V: Probe for unaligned access speed 2023-09-01 09:06:25 -07:00
copy-unaligned.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
cpu_ops_sbi.c riscv: cpu_ops_sbi: Add 64bit hartid support on RV64 2022-07-19 16:38:58 -07:00
cpu_ops_spinwait.c RISC-V: cpu_ops_spinwait.c should include head.h 2022-08-11 13:24:16 -07:00
cpu_ops.c RISC-V: Align SBI probe implementation with spec 2023-04-29 13:04:50 -07:00
cpu-hotplug.c riscv: Switch to hotplug core state synchronization 2023-05-15 13:44:59 +02:00
cpu.c Merge patch series "Linux RISC-V AIA Preparatory Series" 2023-11-08 18:57:17 -08:00
cpufeature.c RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
crash_core.c kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP 2023-12-12 17:20:16 -08:00
crash_dump.c
crash_save_regs.S RISC-V: Fixup get incorrect user mode PC for kernel mode regs 2022-08-11 08:54:40 -07:00
efi-header.S riscv: Prepare EFI header for relocatable kernels 2023-04-19 07:46:28 -07:00
efi.c efi: Discover BTI support in runtime services regions 2023-02-04 09:19:02 +01:00
elf_kexec.c Merge patch series "riscv: kexec: cleanup and fixups" 2023-10-31 19:15:41 -07:00
entry.S riscv: kernel: Use correct SYM_DATA_*() macro for data 2023-11-06 09:42:48 -08:00
fpu.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
ftrace.c RISC-V: Don't check text_mutex during stop_machine 2023-03-09 14:58:51 -08:00
head.h riscv: entry: Convert to generic entry 2023-03-23 08:47:00 -07:00
head.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
hibernate-asm.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
hibernate.c riscv: hibernate: remove WARN_ON in save_processor_state 2023-06-23 10:06:22 -07:00
image-vars.h efi: move screen_info into efi init code 2023-10-17 16:33:39 +02:00
irq.c Merge patch "drivers: perf: Do not broadcast to other cpus when starting a counter" 2023-11-09 06:44:13 -08:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kexec_relocate.S riscv: kexec: Cleanup riscv_kexec_relocate 2023-09-20 02:53:29 -07:00
kgdb.c RISC-V: rename parse_asm.h to insn.h 2022-12-29 06:59:47 -08:00
machine_kexec_file.c
machine_kexec.c riscv: kexec: Fixup crash_smp_send_stop without multi cores 2022-11-29 21:50:59 -08:00
Makefile Merge patch series "riscv: Add remaining module relocations and tests" 2023-11-07 14:59:35 -08:00
mcount-dyn.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
mcount.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
module-sections.c
module.c RISC-V: Don't rely on positional structure initialization 2023-11-07 15:00:05 -08:00
patch.c riscv: implement a memset like function for text 2023-09-06 06:26:06 -07:00
perf_callchain.c
perf_regs.c
process.c riscv: add support for PR_SET_UNALIGN and PR_GET_UNALIGN 2023-11-01 08:34:59 -07:00
ptrace.c RISC-V: Add ptrace support for vectors 2023-09-01 13:05:38 -07:00
reset.c
riscv_ksyms.c RISC-V: add infrastructure to allow different str* implementations 2023-01-31 11:43:23 -08:00
sbi-ipi.c RISC-V: Allow marking IPIs as suitable for remote FENCEs 2023-04-08 11:26:24 +01:00
sbi.c riscv: Make __flush_tlb_range() loop over pte instead of flushing the whole tlb 2023-11-06 07:20:51 -08:00
setup.c Merge patch "drivers: perf: Do not broadcast to other cpus when starting a counter" 2023-11-09 06:44:13 -08:00
signal.c Merge patch "drivers: perf: Do not broadcast to other cpus when starting a counter" 2023-11-09 06:44:13 -08:00
smp.c riscv: Fix CPU feature detection with SMP disabled 2023-08-08 15:28:25 -07:00
smpboot.c RISC-V: Probe misaligned access speed in parallel 2023-11-07 15:13:47 -08:00
soc.c
stacktrace.c riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode 2023-03-09 14:50:35 -08:00
suspend_entry.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
suspend.c RISC-V: Change suspend_save_csrs and suspend_restore_csrs to public function 2023-04-29 11:25:10 -07:00
sys_riscv.c RISC-V Patches for the 6.7 Merge Window, Part 1 2023-11-08 09:21:18 -08:00
syscall_table.c riscv: Implement syscall wrappers 2023-08-23 14:16:36 -07:00
time.c RISC-V: time.c: Add ACPI support for time_init() 2023-06-01 08:45:13 -07:00
traps_misaligned.c RISC-V: Remove __init on unaligned_emulation_finish() 2023-11-07 15:13:19 -08:00
traps.c Merge patch "drivers: perf: Do not broadcast to other cpus when starting a counter" 2023-11-09 06:44:13 -08:00
vdso.c riscv: vdso: include vdso/vsyscall.h for vdso_data 2023-07-04 07:54:41 -07:00
vector.c riscv: Remove now superfluous sentinel element from ctl_table array 2023-10-10 15:22:02 -07:00
vmlinux-xip.lds.S riscv: vmlinux-xip.lds.S: remove .alternative section 2023-06-25 16:24:03 -07:00
vmlinux.lds.S riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION 2023-06-25 16:24:05 -07:00