linux-stable/arch/powerpc
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
..
boot powerpc/fsl: Fix fsl,tmu-calibration to match the schema 2023-12-19 21:53:56 +11:00
configs Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
crypto crypto: p10-aes-gcm - Avoid -Wstringop-overflow warnings 2023-12-01 18:03:26 +08:00
include mm/mmu_gather: add tlb_remove_tlb_entries() 2024-02-22 15:27:17 -08:00
kernel crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
kexec arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00
kvm Generic: 2024-01-17 13:03:37 -08:00
lib powerpc/lib: Validate size for vector operations 2023-11-27 22:06:19 +11:00
math-emu
mm kexec: split crashkernel reservation code out from crash_core.c 2024-02-23 17:48:21 -08:00
net powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free] 2023-10-23 20:33:19 +11:00
perf Performance events changes for v6.8 are: 2024-01-08 19:37:20 -08:00
platforms crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-12 11:31:50 -07:00
sysdev powerpc: udbg_memcons: mark functions static 2024-02-06 21:17:44 +11:00
tools powerpc/tools: Pass -mabi=elfv2 to gcc-check-mprofile-kernel.sh 2023-10-20 17:46:33 +11:00
xmon TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
Kbuild
Kconfig ppc, crash: enforce KEXEC and KEXEC_FILE to select CRASH_DUMP 2024-02-23 17:48:23 -08:00
Kconfig.debug powerpc/ps3: move udbg_shutdown_ps3gelic prototype 2023-11-21 12:06:50 +11:00
Makefile powerpc/Makefile: Auto detect cross compiler 2023-12-07 23:34:38 +11:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00