linux-stable/arch
Baoquan He 2c44b67e2e crash: remove dependency of FA_DUMP on CRASH_DUMP
In kdump kernel, /proc/vmcore is an elf file mapping the crashed kernel's
old memory content. Its elf header is constructed in 1st kernel and passed
to kdump kernel via elfcorehdr_addr. Config CRASH_DUMP enables the code
of 1st kernel's old memory accessing in different architectures.

Currently, config FA_DUMP has dependency on CRASH_DUMP because fadump
needs access global variable 'elfcorehdr_addr' to judge if it's in
kdump kernel within function is_kdump_kernel(). In the current
kernel/crash_dump.c, variable 'elfcorehdr_addr' is defined, and function
setup_elfcorehdr() used to parse kernel parameter to fetch the passed
value of elfcorehdr_addr. Only for accessing elfcorehdr_addr, FA_DUMP
really doesn't have to depends on CRASH_DUMP.

To remove the dependency of FA_DUMP on CRASH_DUMP to avoid confusion,
rename kernel/crash_dump.c to kernel/elfcorehdr.c, and build it when
CONFIG_VMCORE_INFO is ebabled. With this, FA_DUMP doesn't need to depend
on CRASH_DUMP.

[bhe@redhat.com: power/fadump: make FA_DUMP select CRASH_DUMP]
  Link: https://lkml.kernel.org/r/Zb8D1ASrgX0qVm9z@MiWiFi-R3L-srv
Link: https://lkml.kernel.org/r/20240124051254.67105-4-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Hari Bathini <hbathini@linux.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Pingfan Liu <piliu@redhat.com>
Cc: Klara Modin <klarasmodin@gmail.com>
Cc: Michael Kelley <mhklinux@outlook.com>
Cc: Nathan Chancellor <nathan@kernel.org>
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:22 -08:00
..
alpha RTC for 6.8 2024-01-18 17:25:39 -08:00
arc Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
arm Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
arm64 crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
csky Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
hexagon asm-generic cleanups for 6.8 2024-01-10 18:13:44 -08:00
loongarch work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
m68k Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
microblaze Microblaze patches for 6.8-rc1 2024-01-17 11:27:23 -08:00
mips Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
nios2 Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
openrisc
parisc Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
powerpc crash: remove dependency of FA_DUMP on CRASH_DUMP 2024-02-23 17:48:22 -08:00
riscv crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
s390 mm/mmu_gather: add __tlb_remove_folio_pages() 2024-02-22 15:27:17 -08:00
sh Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
sparc Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
um work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
x86 crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
xtensa Introduce cpu_dcache_is_aliasing() across all architectures 2024-02-22 15:27:19 -08:00
.gitignore
Kconfig scs: add CONFIG_MMU dependency for vfree_atomic() 2024-01-25 23:52:21 -08:00