Re: [PATCH] ARM: zImage: atags_to_fdt: Fix node names on added root nodes

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

 



On 27/01/21 9:16 am, Chris Packham wrote:
> Hi Rob
>
> On 27/01/21 3:25 am, Rob Herring wrote:
>> On Mon, Jan 25, 2021 at 8:50 PM Chris Packham
>> <Chris.Packham@xxxxxxxxxxxxxxxxxxx> wrote:
>>> Hi Rob,
>>>
>>> On 26/01/21 3:39 pm, Rob Herring wrote:
>>>> Commit 7536c7e03e74 ("of/fdt: Remove redundant kbasename function
>>>> call") exposed a bug creating DT nodes in the ATAGS to DT fixup code.
>>>> Non-existent nodes would mistaken get created with a leading '/'. The
>>>> problem was fdt_path_offset() takes a full path while creating a node
>>>> with fdt_add_subnode() takes just the basename.
>>>>
>>>> Since this we only add root child nodes, we can just skip over the 
>>>> '/'.
>>>>
>>>> Fixes: 7536c7e03e74 ("of/fdt: Remove redundant kbasename function 
>>>> call")
>>>> Reported-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
>>>> Cc: Qi Zheng <arch0.zheng@xxxxxxxxx>
>>>> Cc: Russell King <linux@xxxxxxxxxxxxxxx>
>>>> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
>>> Thanks for the quick patch. It doesn't quite seem to work as my system
>>> can't find it's initrd (it can with my other hacky patch). It does seem
>>> to get the command line info as I'm getting printk output.
>> That doesn't make sense. Can you enable debug in drivers/of/fdt.c.
> I've attached two captures with DEBUG enabled in drivers/of/fdt.c. One 
> with your patch and one with mine. I note that in your one we do 
> actually pick up initrd_start/initrd_end but then it gets disabled for 
> some reason (possibly other changes we have in our kernel).

Sure enough I turned off our "special" code and it all works as 
expected. I'll reply back to the original change with my Tested-by:.





[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