Re: [PATCH] of_reserved_mem: Save region name string into struct reserved_mem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 26, 2024 at 9:22 AM Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx> wrote:
>
>
>
> 在2024年8月26日八月 下午3:09,Rob Herring写道:
> > On Wed, Aug 21, 2024 at 8:51 AM Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx> 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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux