[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMo8Bf+2TeKoW76FJY6=GgB05UFW11fX1MuwqyLEMQbcNoL8Mg@mail.gmail.com>
Date: Tue, 8 Apr 2014 07:54:48 +0400
From: Max Filippov <jcmvbkbc@...il.com>
To: Rob Herring <robherring2@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh@...nel.org>
Subject: Re: [PATCH 14/20] of/fdt: use libfdt accessors for header data
Hi Rob,
On Fri, Apr 4, 2014 at 2:16 AM, Rob Herring <robherring2@...il.com> wrote:
> From: Rob Herring <robh@...nel.org>
>
> With libfdt support, we can take advantage of helper accessors in libfdt
> for accessing the FDT header data. This makes the code more readable and
> makes the FDT blob structure more opaque to the kernel. This also
> prepares for removing struct boot_param_header completely.
>
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
> drivers/of/fdt.c | 27 ++++++++++++---------------
> include/linux/of_fdt.h | 8 ++++----
> 2 files changed, 16 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index ee8853c..dc5f233 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
[...]
> @@ -902,9 +900,8 @@ void __init unflatten_and_copy_device_tree(void)
> return;
> }
>
> - size = __be32_to_cpu(initial_boot_params->totalsize);
> - dt = early_init_dt_alloc_memory_arch(size,
> - __alignof__(struct boot_param_header));
> + size = fdt_totalsize(initial_boot_params);
> + dt = early_init_dt_alloc_memory_arch(size, FDT_V17_SIZE);
This change triggers BUG_ON(align & (align - 1)) in the alloc_bootmem_bdata()
on xtensa.
--
Thanks.
-- Max
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists