[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+=KPKqkjd1JFNGJRKgF-FQPM=+we+09EnY3AQVGkP-6g@mail.gmail.com>
Date: Mon, 26 Aug 2024 10:14:31 -0500
From: Rob Herring <robh@...nel.org>
To: Jiaxun Yang <jiaxun.yang@...goat.com>
Cc: Saravana Kannan <saravanak@...gle.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev,
Huacai Chen <chenhuacai@...nel.org>, Kevin Wheatfox <enkerewpo@...mail.com>
Subject: Re: [PATCH] of_reserved_mem: Save region name string into struct reserved_mem
On Mon, Aug 26, 2024 at 9:22 AM Jiaxun Yang <jiaxun.yang@...goat.com> wrote:
>
>
>
> 在2024年8月26日八月 下午3:09,Rob Herring写道:
> > On Wed, Aug 21, 2024 at 8:51 AM Jiaxun Yang <jiaxun.yang@...goat.com> wrote:
> >>
> >> Previously only a pointer to fdt string pool is saved to struct
> >> reserved_mem as region name.
> >>
> >> As on some architectures booting FDT will be wiped at later initialisation
> >> stages, this is breaking reserved_mem users.
> >
> > What architectures? Be specific.
>
> It's LoongArch and MIPS, I'll expand commit message.
>
> FDT might be placed in .init sections or memory not managed by kernel, thus
> it may be wiped out.
>
> >
> > Why is the FDT wiped? It should be preserved and you need it later to
> > implement kexec.
>
> So KEXEC is using kernel's self copy of FDT created by unflatten_and_copy_device_tree(),
> while reserved-mem scan is performed before copy to ensure that reserved memory
> are being tracked by memblock before possible memblock_alloc in unflatten_and_copy_device_tree().
The FDT being copied is not the same as 'wiped out'.
I'd rather update the pointers when copied or eliminate the need to
store them than introduce an arbitrary max length. Though if name
comes from the node name, then that has a max of 63 already.
Rob
Powered by blists - more mailing lists