]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kexec_file: Restore FDT size estimation for kdump kernel
authorThiago Jung Bauermann <bauerman@linux.ibm.com>
Sat, 20 Feb 2021 00:52:04 +0000 (21:52 -0300)
committerRob Herring <robh@kernel.org>
Thu, 11 Mar 2021 16:53:38 +0000 (09:53 -0700)
commit6c7429a0af106fb793f15c80dc2bb70e8aa5a349
treee2088fdeaffb3502bcf91a1601c5bbec99fcd7a6
parent1e4b7f7e81b29dc6d2cabd6583676b0ae48748a9
powerpc/kexec_file: Restore FDT size estimation for kdump kernel

kexec_fdt_totalsize_ppc64() includes the base FDT size in its size
calculation, but commit 630b2abbfc47 ("powerpc: Use common
of_kexec_alloc_and_setup_fdt()") changed the kexec code to use the
generic function of_kexec_alloc_and_setup_fdt() which already includes
the base FDT size. That change made the code overestimate the size a bit
by counting twice the space required for the kernel command line and
/chosen properties.

Therefore change kexec_fdt_totalsize_ppc64() to calculate just the extra
space needed by the kdump kernel, and change the function name so that it
better reflects what the function is now doing.

Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
[robh: reword commit msg as no longer a fix from merging to branches]
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210220005204.1417200-1-bauerman@linux.ibm.com
arch/powerpc/include/asm/kexec.h
arch/powerpc/kexec/elf_64.c
arch/powerpc/kexec/file_load_64.c