Re: [PATCH 01/20] mips: octeon: convert to use unflatten_and_copy_device_tree
From: Rob Herring
Date: Tue Apr 15 2014 - 21:03:04 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/