WSL2-Linux-Kernel/arch/powerpc/kexec
Sourabh Jain 06ee48a4fc powerpc: Set crashkernel offset to mid of RMA region
[ Upstream commit 7c5ed82b80 ]

On large config LPARs (having 192 and more cores), Linux fails to boot
due to insufficient memory in the first memblock. It is due to the
memory reservation for the crash kernel which starts at 128MB offset of
the first memblock. This memory reservation for the crash kernel doesn't
leave enough space in the first memblock to accommodate other essential
system resources.

The crash kernel start address was set to 128MB offset by default to
ensure that the crash kernel get some memory below the RMA region which
is used to be of size 256MB. But given that the RMA region size can be
512MB or more, setting the crash kernel offset to mid of RMA size will
leave enough space for the kernel to allocate memory for other system
resources.

Since the above crash kernel offset change is only applicable to the LPAR
platform, the LPAR feature detection is pushed before the crash kernel
reservation. The rest of LPAR specific initialization will still
be done during pseries_probe_fw_features as usual.

This patch is dependent on changes to paca allocation for boot CPU. It
expect boot CPU to discover 1T segment support which is introduced by
the patch posted here:
https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-January/239175.html

Reported-by: Abdul haleem <abdhalee@linux.vnet.ibm.com>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220204085601.107257-1-sourabhjain@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 20:59:03 +02:00
..
Makefile powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c 2021-03-08 12:06:29 -07:00
core.c powerpc: Set crashkernel offset to mid of RMA region 2022-04-13 20:59:03 +02:00
core_32.c
core_64.c powerpc/kexec: fix for_each_child.cocci warning 2021-08-10 23:14:55 +10:00
crash.c Merge branch 'rework/printk_safe-removal' into for-linus 2021-08-30 16:36:10 +02:00
elf_64.c powerpc: If kexec_build_elf_info() fails return immediately from elf64_load() 2021-04-26 16:28:26 -05:00
file_load.c powerpc: Delete unused function delete_fdt_mem_rsv() 2021-03-08 12:06:30 -07:00
file_load_64.c powerpc/kexec_file: Use current CPU info while setting up FDT 2021-05-04 22:26:57 +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: Avoid link stack corruption in misc asm functions 2021-08-25 13:35:47 +10:00