linux_dsm_epyc7002/arch/powerpc/kexec
Sourabh Jain f2aa64979e powerpc/kexec_file: Use current CPU info while setting up FDT
commit 40c753993e3aad51a12c21233486e2037417a4d6 upstream.

kexec_file_load() uses initial_boot_params in setting up the device tree
for the kernel to be loaded. Though initial_boot_params holds info about
CPUs at the time of boot, it doesn't account for hot added CPUs.

So, kexec'ing with kexec_file_load() syscall leaves the kexec'ed kernel
with inaccurate CPU info.

If kdump kernel is loaded with kexec_file_load() syscall and the system
crashes on a hot added CPU, the capture kernel hangs failing to identify
the boot CPU, with no output.

To avoid this from happening, extract current CPU info from of_root
device node and use it for setting up the fdt in kexec_file_load case.

Fixes: 6ecd0163d3 ("powerpc/kexec_file: Add appropriate regions for memory reserve map")
Cc: stable@vger.kernel.org # v5.9+
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210429060256.199714-1-sourabhjain@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-11 14:47:35 +02:00
..
core_32.c powerpc/kexec: Move kexec files into a dedicated subdir. 2019-11-21 15:41:34 +11:00
core_64.c powerpc/book3s64/keys/kuap: Reset AMR/IAMR values on kexec 2020-07-20 22:57:59 +10:00
core.c powerpc/crashkernel: Take "mem=" option into account 2020-06-02 20:59:05 +10:00
crash.c powerpc/crash: Use NMI context for printk when starting to crash 2020-06-02 20:59:07 +10:00
elf_64.c powerpc/kexec_file: fix FDT size estimation for kdump kernel 2021-03-04 11:38:39 +01:00
file_load_64.c powerpc/kexec_file: Use current CPU info while setting up FDT 2021-05-11 14:47:35 +02:00
file_load.c powerpc/kexec_file: Prepare elfcore header for crashing kernel 2020-07-29 23:47:54 +10:00
ima.c powerpc/kexec: Move kexec files into a dedicated subdir. 2019-11-21 15:41:34 +11:00
Makefile powerpc/kexec_file: Add helper functions for getting memory ranges 2020-07-29 23:47:53 +10:00
ranges.c powerpc/kexec_file: Avoid stomping memory used by special regions 2020-07-29 23:47:53 +10:00
relocate_32.S powerpc/kexec: Move kexec files into a dedicated subdir. 2019-11-21 15:41:34 +11:00