[PATCH 1/2] powerpc: reserve memory for capture kernel after hugepages init

Christophe Leroy christophe.leroy at csgroup.eu
Tue Feb 1 22:18:09 AEDT 2022



Le 27/06/2019 à 21:21, Hari Bathini a écrit :
> Sometimes, memory reservation for KDump/FADump can overlap with memory
> marked for hugepages. This overlap leads to error, hang in KDump case
> and copy error reported by f/w in case of FADump, while trying to
> capture dump. Report error while setting up memory for the capture
> kernel instead of running into issues while capturing dump, by moving
> KDump/FADump reservation below MMU early init and failing gracefully
> when hugepages memory overlaps with capture kernel memory.

This patch doesn't apply, if it's still needed can you please rebase ?

Christophe

> 
> Signed-off-by: Hari Bathini <hbathini at linux.ibm.com>
> ---
>   arch/powerpc/kernel/prom.c |   16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 7159e79..454e19cf 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -731,14 +731,6 @@ void __init early_init_devtree(void *params)
>   	if (PHYSICAL_START > MEMORY_START)
>   		memblock_reserve(MEMORY_START, 0x8000);
>   	reserve_kdump_trampoline();
> -#ifdef CONFIG_FA_DUMP
> -	/*
> -	 * If we fail to reserve memory for firmware-assisted dump then
> -	 * fallback to kexec based kdump.
> -	 */
> -	if (fadump_reserve_mem() == 0)
> -#endif
> -		reserve_crashkernel();
>   	early_reserve_mem();
>   
>   	/* Ensure that total memory size is page-aligned. */
> @@ -777,6 +769,14 @@ void __init early_init_devtree(void *params)
>   #endif
>   
>   	mmu_early_init_devtree();
> +#ifdef CONFIG_FA_DUMP
> +	/*
> +	 * If we fail to reserve memory for firmware-assisted dump then
> +	 * fallback to kexec based kdump.
> +	 */
> +	if (fadump_reserve_mem() == 0)
> +#endif
> +		reserve_crashkernel();
>   
>   #ifdef CONFIG_PPC_POWERNV
>   	/* Scan and build the list of machine check recoverable ranges */


More information about the Linuxppc-dev mailing list