lkml.org 
[lkml]   [2014]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 14/20] of/fdt: use libfdt accessors for header data
From
Hi Rob,

On Fri, Apr 4, 2014 at 2:16 AM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <robh@kernel.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@kernel.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


\
 
 \ /
  Last update: 2014-04-08 06:41    [W:0.129 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site