linux-stable/arch/s390
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
..
appldata S390: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
boot s390/boot: always align vmalloc area on segment boundary 2023-11-22 14:07:28 +01:00
configs vfs-6.8.netfs 2024-01-19 09:10:23 -08:00
crypto s390 updates for 6.8 merge window 2024-01-10 18:18:20 -08:00
hypfs hypfs: convert to new timestamp accessors 2023-10-18 13:26:15 +02:00
include mm/mmu_gather: add __tlb_remove_folio_pages() 2024-02-22 15:27:17 -08:00
kernel arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00
kvm pqap instruction missing cc fix 2024-01-26 12:57:12 -05:00
lib s390/nmi: implement and use local_mcck_save() / local_mcck_restore() 2023-12-11 14:33:05 +01:00
mm mm: ptdump: have ptdump_check_wx() return bool 2024-02-22 10:24:47 -08:00
net s390/bpf: Fix gotol with large offsets 2024-01-04 11:35:40 -08:00
pci s390/pci: fix max size calculation in zpci_memcpy_toio() 2024-01-11 18:22:58 +01:00
purgatory s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
tools s390/als: add vector facility to z13 architecture level set 2023-12-11 14:33:07 +01:00
Kbuild - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig s390: enable MHP_MEMMAP_ON_MEMORY 2024-02-21 16:00:02 -08:00
Kconfig.debug
Makefile kbuild: unify vdso_install rules 2023-10-28 21:09:02 +09:00