linux-next: manual merge of the devicetree tree with the powerpc tree

Stephen Rothwell sfr at canb.auug.org.au
Thu Feb 18 22:34:27 AEDT 2021


Hi Michael,

On Thu, 18 Feb 2021 21:44:37 +1100 Michael Ellerman <mpe at ellerman.id.au> wrote:
>
> I think it just needs this?
> 
> diff --git a/arch/powerpc/kexec/elf_64.c b/arch/powerpc/kexec/elf_64.c
> index 87e34611f93d..0492ca6003f3 100644
> --- a/arch/powerpc/kexec/elf_64.c
> +++ b/arch/powerpc/kexec/elf_64.c
> @@ -104,7 +104,7 @@ static void *elf64_load(struct kimage *image, char *kernel_buf,
>  
>  	fdt = of_kexec_alloc_and_setup_fdt(image, initrd_load_addr,
>  					   initrd_len, cmdline,
> -					   fdt_totalsize(initial_boot_params));
> +					   kexec_fdt_totalsize_ppc64(image));
>  	if (!fdt) {
>  		pr_err("Error setting up the new device tree.\n");
>  		ret = -EINVAL;
> 

I thought about that, but the last argument to
of_kexec_alloc_and_setup_fdt() is extra_fdt_size and the allocation
done is for this:

fdt_size = fdt_totalsize(initial_boot_params) +
                   (cmdline ? strlen(cmdline) : 0) +
                   FDT_EXTRA_SPACE +
                   extra_fdt_size;

and kexec_fdt_totalsize_ppc64() also includes
fdt_totalsize(initial_boot_params) so I was not sure.  Maybe
kexec_fdt_totalsize_ppc64() needs modification as well?

-- 
Cheers,
Stephen Rothwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20210218/2ddebd7f/attachment.sig>


More information about the Linuxppc-dev mailing list