From: Michael Ellerman <mpe@ellerman•id.au>
To: Rob Herring <robherring2@gmail•com>,
Stephen Rothwell <sfr@canb•auug.org.au>
Cc: PowerPC <linuxppc-dev@lists•ozlabs.org>,
Hari Bathini <hbathini@linux•ibm.com>,
Lakshmi Ramasubramanian <nramas@linux•microsoft.com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: manual merge of the devicetree tree with the powerpc tree
Date: Fri, 19 Feb 2021 10:28:46 +1100 [thread overview]
Message-ID: <87r1ldt0pd.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <CAL_JsqJ9Ske4hkWn3uo8-nef29MQ1DkNdtE=gxbqj8CKrtQorg@mail.gmail.com>
Rob Herring <robherring2@gmail•com> writes:
> On Thu, Feb 18, 2021 at 5:34 AM Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>> On Thu, 18 Feb 2021 21:44:37 +1100 Michael Ellerman <mpe@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?
>
> You're both right. Michael's fix is sufficient for the merge. The only
> risk with a larger size is failing to allocate it, but we're talking
> only 10s of KB. Historically until the commit causing the conflict,
> PPC was just used 2x fdt_totalsize(initial_boot_params). You could
> drop 'fdt_size = fdt_totalsize(initial_boot_params) + (2 *
> COMMAND_LINE_SIZE);' from kexec_fdt_totalsize_ppc64() as well, but
> then the function name is misleading.
>
> Lakshmi can send a follow-up patch to fine tune the size and rename
> kexec_fdt_totalsize_ppc64.
Sounds good.
cheers
next prev parent reply other threads:[~2021-02-18 23:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 3:48 linux-next: manual merge of the devicetree tree with the powerpc tree Stephen Rothwell
2021-02-18 10:44 ` Michael Ellerman
2021-02-18 11:34 ` Stephen Rothwell
2021-02-18 13:52 ` Rob Herring
2021-02-18 20:31 ` Stephen Rothwell
2021-02-18 23:28 ` Michael Ellerman [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-13 5:01 Stephen Rothwell
2012-03-13 18:26 ` Grant Likely
2012-03-14 1:53 ` Gavin Shan
2012-03-14 8:29 ` Benjamin Herrenschmidt
2012-03-14 9:02 ` Gavin Shan
2012-02-28 2:06 Stephen Rothwell
2012-02-28 4:38 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1ldt0pd.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=hbathini@linux$(echo .)ibm.com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=nramas@linux$(echo .)microsoft.com \
--cc=robherring2@gmail$(echo .)com \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox