From 886db32398aba36937e3a61bc093bf4d859cfaf8 Mon Sep 17 00:00:00 2001 From: Thiago Jung Bauermann Date: Fri, 19 Feb 2021 21:52:04 -0300 Subject: 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 3c985d31ad66 ("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 Reviewed-by: Lakshmi Ramasubramanian Reviewed-by: Hari Bathini Acked-by: Michael Ellerman [robh: reword commit msg as no longer a fix from merging to branches] Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210220005204.1417200-1-bauerman@linux.ibm.com --- arch/powerpc/include/asm/kexec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index 9fccbb10face..88d0d7cf3a79 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -124,7 +124,7 @@ int load_crashdump_segments_ppc64(struct kimage *image, int setup_purgatory_ppc64(struct kimage *image, const void *slave_code, const void *fdt, unsigned long kernel_load_addr, unsigned long fdt_load_addr); -unsigned int kexec_fdt_totalsize_ppc64(struct kimage *image); +unsigned int kexec_extra_fdt_size_ppc64(struct kimage *image); int setup_new_fdt_ppc64(const struct kimage *image, void *fdt, unsigned long initrd_load_addr, unsigned long initrd_len, const char *cmdline); -- cgit 1.4.1