linux-stable/arch/s390/kernel
Baoquan He 199da8714c arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c
Nathan reported below building error:

=====
$ curl -LSso .config https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.armv7
$ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- olddefconfig all
..
arm-linux-gnueabi-ld: arch/arm/kernel/machine_kexec.o: in function `arch_crash_save_vmcoreinfo':
machine_kexec.c:(.text+0x488): undefined reference to `vmcoreinfo_append_str'
====

On architecutres, like arm, s390, ppc, sh, function
arch_crash_save_vmcoreinfo() is located in machine_kexec.c and it can
only be compiled in when CONFIG_KEXEC_CORE=y.

That's not right because arch_crash_save_vmcoreinfo() is used to export
arch specific vmcoreinfo. CONFIG_VMCORE_INFO is supposed to control its
compiling in. However, CONFIG_VMVCORE_INFO could be independent of
CONFIG_KEXEC_CORE, e.g CONFIG_PROC_KCORE=y will select CONFIG_VMVCORE_INFO.
Or CONFIG_KEXEC/CONFIG_KEXEC_FILE is set while CONFIG_CRASH_DUMP is
not set, it will report linking error.

So, on arm, s390, ppc and sh, move arch_crash_save_vmcoreinfo out to
a new file vmcore_info.c. Let CONFIG_VMCORE_INFO decide if compiling in
arch_crash_save_vmcoreinfo().

[akpm@linux-foundation.org: remove stray newlines at eof]
Link: https://lkml.kernel.org/r/20240129135033.157195-3-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Klara Modin <klarasmodin@gmail.com>
Cc: Michael Kelley <mhklinux@outlook.com>
Cc: Pingfan Liu <piliu@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-02-23 17:48:25 -08:00
..
syscalls lsm/stable-6.8 PR 20240105 2024-01-09 12:57:46 -08:00
vdso32 kbuild: unify vdso_install rules 2023-10-28 21:09:02 +09:00
vdso64 kbuild: unify vdso_install rules 2023-10-28 21:09:02 +09:00
.gitignore
Makefile arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00
abs_lowcore.c s390/mm: allocate Absolute Lowcore Area in decompressor 2023-01-13 14:15:06 +01:00
alternative.c s390/alternatives: remove padding generation code 2022-05-17 15:16:28 +02:00
asm-offsets.c s390/tracing: pass struct ftrace_regs to ftrace_trace_function 2023-07-24 12:12:24 +02:00
audit.c
audit.h
cache.c s390/cache: change type from unsigned long long to unsigned long 2023-01-25 20:51:09 +01:00
cert_store.c s390/cert_store: fix string length handling 2023-09-19 13:25:44 +02:00
compat_audit.c
compat_linux.c
compat_linux.h s390/compat: cleanup compat_linux.h header file 2022-05-06 20:45:16 +02:00
compat_ptrace.h
compat_signal.c s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
cpcmd.c s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
cpufeature.c s390/uvdevice: autoload module based on CPU facility 2022-07-19 16:18:49 +02:00
crash_dump.c s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
ctlreg.c s390/ctlreg: add system_ctl_load() 2023-09-19 13:26:57 +02:00
debug.c S390: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
diag.c s390/diag: add missing virt_to_phys() translation to diag224() 2023-10-23 18:21:23 +02:00
dis.c s390: fix various typos 2023-07-03 11:19:42 +02:00
dumpstack.c s390/dumpstack: simplify in stack logic code 2023-04-04 18:34:55 +02:00
early.c s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
early_printk.c
earlypgm.S s390/earlypgm: use SYM* macros instead of ENTRY(), etc. 2023-04-19 17:24:17 +02:00
ebcdic.c s390/ebcdic: fix typo in comment 2023-07-27 13:11:35 +02:00
entry.S s390: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-09 15:20:50 +02:00
entry.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
facility.c KVM: s390: vsie: Fix length of facility list shadowed 2023-12-23 10:41:09 +01:00
fpu.c s390/fpu: remove __load_fpu_regs() export 2024-01-11 18:22:59 +01:00
ftrace.c s390/ftrace: do not assume module_alloc() returns executable memory 2023-04-13 17:36:26 +02:00
ftrace.h s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
guarded_storage.c s390: use control register bit defines 2023-09-19 13:26:57 +02:00
head64.S s390: consistently use .balign instead of .align 2023-06-28 13:57:09 +02:00
idle.c sched/idle: Mark arch_cpu_idle_dead() __noreturn 2023-03-08 08:44:28 -08:00
ima_arch.c
ipl.c s390/ipl: add missing IPL_TYPE_ECKD_DUMP case to ipl_init() 2023-11-22 13:54:57 +01:00
ipl_vmparm.c
irq.c s390/ctlreg: add local and system prefix to some functions 2023-09-19 13:26:56 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kdebugfs.c
kexec_elf.c s390, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
kexec_image.c s390, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
kprobes.c s390/ctlreg: add struct ctlreg 2023-09-19 13:26:56 +02:00
kprobes.h s390/kprobes: define insn cache ops within private header file 2022-11-23 16:24:07 +01:00
kprobes_insn_page.S s390: consistently use .balign instead of .align 2023-06-28 13:57:09 +02:00
lgr.c s390/lgr: use simple assignment instead of memcpy 2022-02-06 23:31:29 +01:00
machine_kexec.c arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00
machine_kexec_file.c s390, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
machine_kexec_reloc.c
mcount.S s390: remove unneeded #include <asm/export.h> 2023-08-09 15:20:50 +02:00
module.c s390/module: fix rela calculation for R_390_GOTENT 2023-06-20 19:55:00 +02:00
nmi.c s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
nospec-branch.c s390: fix various typos 2023-07-03 11:19:42 +02:00
nospec-sysfs.c s390: introduce nospec_uses_trampoline() 2021-10-26 15:21:29 +02:00
numa.c drivers/base/node: consolidate node device subsystem initialization in node_dev_init() 2022-03-22 15:57:10 -07:00
os_info.c s390/mm: allocate Absolute Lowcore Area in decompressor 2023-01-13 14:15:06 +01:00
perf_cpum_cf.c s390: use control register bit defines 2023-09-19 13:26:57 +02:00
perf_cpum_cf_events.c s390/cpumf: add new extended counter set for IBM z16 2022-05-16 10:58:33 +02:00
perf_cpum_sf.c s390/cpum_sf: remove check on CPU being online 2023-07-04 07:45:18 +02:00
perf_event.c s390/perf: implement perf_callchain_user() 2023-11-05 22:34:57 +01:00
perf_pai_crypto.c s390/pai: rework paiXXX_start and paiXXX_stop functions 2024-01-12 14:23:26 +01:00
perf_pai_ext.c s390/pai_ext: split function paiext_push_sample 2024-01-12 14:23:27 +01:00
perf_regs.c s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
process.c s390/fpu: remove ARCH_WANTS_DYNAMIC_TASK_STRUCT support 2023-12-11 14:33:06 +01:00
processor.c s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
ptrace.c s390/ptrace: remove leftover comment 2024-01-11 18:22:59 +01:00
reipl.S s390/reipl: use SYM* macros instead of ENTRY(), etc. 2023-04-19 17:24:17 +02:00
relocate_kernel.S s390/relocate_kernel: adjust indentation 2023-04-19 17:24:18 +02:00
rethook.c s390/rethook: add local rethook header file 2023-02-06 11:13:53 +01:00
rethook.h s390/rethook: add local rethook header file 2023-02-06 11:13:53 +01:00
runtime_instr.c
setup.c s390/fpu: remove ARCH_WANTS_DYNAMIC_TASK_STRUCT support 2023-12-11 14:33:06 +01:00
signal.c s390 updates for 6.8 merge window 2024-01-10 18:18:20 -08:00
smp.c s390/fpu: get rid of MACHINE_HAS_VX 2023-12-11 14:33:07 +01:00
stacktrace.c s390: add USER_STACKTRACE support 2023-11-05 22:34:57 +01:00
sthyi.c s390 updates for 6.6 merge window 2023-08-28 17:22:39 -07:00
syscall.c s390: add support for BEAR enhancement facility 2021-10-26 15:21:29 +02:00
sysinfo.c s390/sysinfo: add variable capacity information 2023-11-22 14:07:28 +01:00
text_amode31.S s390/amode31: use SYM* macros instead of ENTRY(), etc. 2023-04-19 17:24:16 +02:00
time.c s390: use control register bit defines 2023-09-19 13:26:57 +02:00
topology.c sysctl-6.7-rc1 2023-11-01 20:51:41 -10:00
trace.c
traps.c s390 updates for 6.8 merge window 2024-01-10 18:18:20 -08:00
unwind_bc.c s390/unwind: avoid duplicated unwinding entries for kretprobes 2022-03-27 22:18:39 +02:00
uprobes.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
uv.c s390/uv: UV feature check utility 2023-08-28 09:27:55 +00:00
vdso.c mm: remove zap_page_range and create zap_vma_pages 2023-01-18 17:12:55 -08:00
vmcore_info.c arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00
vmlinux.lds.S s390/fpu: get rid of test_fp_ctl() 2023-12-11 14:33:06 +01:00
vtime.c cputime: remove cputime_to_nsecs fallback 2022-12-27 12:52:17 +01:00