Re: [PATCH 01/20] mips: octeon: convert to use unflatten_and_copy_device_tree

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

 



On Mon, Apr 7, 2014 at 12:46 PM, Andreas Herrmann
<herrmann.der.user@xxxxxxxxxxxxxx> wrote:
> On Thu, Apr 03, 2014 at 05:16:44PM -0500, Rob Herring wrote:
>> From: Rob Herring <robh@xxxxxxxxxx>
>>
>> The octeon FDT code can be simplified by using
>> unflatten_and_copy_device_tree function. This removes all accesses to
>> FDT header data by the arch code.
>
> Hi Rob,
>
> I think (in general) this modification is ok. But I suggest to use
> following (slightly modified) version.

Having to compile each platform on MIPS sure is annoying. Reminds me
of ARM a few years ago. We need a good rant from Linus about MIPS. ;)

>
> -       /* Copy the default tree from init memory. */
> -       initial_boot_params = early_init_dt_alloc_memory_arch(dt_size, 8);
> -       if (initial_boot_params == NULL)
> -               panic("Could not allocate initial_boot_params");
> -       memcpy(initial_boot_params, fdt, dt_size);
> +       initial_boot_params = (void *)fdt;

Does calling early_init_devtree here work instead. This will add
parsing memory, initrd and command line. If you don't have those then
it should be a nop other than setting initial_boot_params. It should
only matter if your DT has these things and you want/need to ignore
them. Do this would get things more inline with other arches.

Rob


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux