]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kexec_file: fix FDT size estimation for kdump kernel
authorHari Bathini <hbathini@linux.ibm.com>
Thu, 4 Feb 2021 11:31:10 +0000 (17:01 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Feb 2021 12:35:07 +0000 (23:35 +1100)
commit88edf2a76c7f041eda42d9c8ea823dfa7176120e
tree4a246b1cdb2be32ab4f7bdb3d053ba834836517e
parent423edf4d9859a164e8a46baf5ffe49922f7f875e
powerpc/kexec_file: fix FDT size estimation for kdump kernel

On systems with large amount of memory, loading kdump kernel through
kexec_file_load syscall may fail with the below error:

    "Failed to update fdt with linux,drconf-usable-memory property"

This happens because the size estimation for kdump kernel's FDT does
not account for the additional space needed to setup usable memory
properties. Fix it by accounting for the space needed to include
linux,usable-memory & linux,drconf-usable-memory properties while
estimating kdump kernel's FDT size.

Fixes: 08107638af21 ("powerpc/kexec_file: Add appropriate regions for memory reserve map")
Cc: stable@vger.kernel.org # v5.9+
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/161243826811.119001.14083048209224609814.stgit@hbathini
arch/powerpc/include/asm/kexec.h
arch/powerpc/kexec/elf_64.c
arch/powerpc/kexec/file_load_64.c