From: James Hogan <james.hogan@imgtec.com>
To: Rob Herring <robherring2@gmail.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
linux-metag <linux-metag@vger.kernel.org>,
Qais <qais.yousef@imgtec.com>, Qais Yousef <qsyousef@gmail.com>
Subject: Re: [PATCH v2 08/29] metag: use unflatten_and_copy_device_tree
Date: Fri, 8 Nov 2013 13:12:15 +0000 [thread overview]
Message-ID: <527CE32F.6090305@imgtec.com> (raw)
In-Reply-To: <1381163377-21044-9-git-send-email-robherring2@gmail.com>
On 07/10/13 17:29, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Use the common unflatten_and_copy_device_tree to copy the built-in FDT
> out of init section.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: James Hogan <james.hogan@imgtec.com>
With Qais' suggestion of removing the extern void copy_fdt(void) from
arch/metag/include/asm/prom.h (thanks Qais):
Acked-by: James Hogan <james.hogan@imgtec.com>
Cheers
James
> ---
> arch/metag/kernel/devtree.c | 16 ----------------
> arch/metag/kernel/setup.c | 4 +---
> 2 files changed, 1 insertion(+), 19 deletions(-)
>
> diff --git a/arch/metag/kernel/devtree.c b/arch/metag/kernel/devtree.c
> index 7cd0252..049af56 100644
> --- a/arch/metag/kernel/devtree.c
> +++ b/arch/metag/kernel/devtree.c
> @@ -94,21 +94,5 @@ struct machine_desc * __init setup_machine_fdt(void *dt)
> of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);
>
> return mdesc_best;
> -}
>
> -/**
> - * copy_fdt - Copy device tree into non-init memory.
> - *
> - * We must copy the flattened device tree blob into non-init memory because the
> - * unflattened device tree will reference the strings in it directly.
> - */
> -void __init copy_fdt(void)
> -{
> - void *alloc = early_init_dt_alloc_memory_arch(
> - be32_to_cpu(initial_boot_params->totalsize), 0x40);
> - if (alloc) {
> - memcpy(alloc, initial_boot_params,
> - be32_to_cpu(initial_boot_params->totalsize));
> - initial_boot_params = alloc;
> - }
> }
> diff --git a/arch/metag/kernel/setup.c b/arch/metag/kernel/setup.c
> index c396cd0..2c697d3 100644
> --- a/arch/metag/kernel/setup.c
> +++ b/arch/metag/kernel/setup.c
> @@ -408,9 +408,7 @@ void __init setup_arch(char **cmdline_p)
> cpu_2_hwthread_id[smp_processor_id()] = hard_processor_id();
> hwthread_id_2_cpu[hard_processor_id()] = smp_processor_id();
>
> - /* Copy device tree blob into non-init memory before unflattening */
> - copy_fdt();
> - unflatten_device_tree();
> + unflatten_and_copy_device_tree();
>
> #ifdef CONFIG_SMP
> smp_init_cpus();
>
next prev parent reply other threads:[~2013-11-08 13:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1381163377-21044-1-git-send-email-robherring2@gmail.com>
[not found] ` <1381163377-21044-15-git-send-email-robherring2@gmail.com>
[not found] ` <1381163377-21044-15-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-08 13:06 ` [PATCH v2 14/29] metag: use early_init_dt_scan James Hogan
[not found] ` <1381163377-21044-23-git-send-email-robherring2@gmail.com>
[not found] ` <1381163377-21044-23-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-08 13:07 ` [PATCH v2 22/29] of: remove early_init_dt_setup_initrd_arch James Hogan
[not found] ` <1381163377-21044-9-git-send-email-robherring2@gmail.com>
2013-11-08 13:12 ` James Hogan [this message]
[not found] ` <527CE32F.6090305-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2013-11-08 17:26 ` [PATCH v2 08/29] metag: use unflatten_and_copy_device_tree Rob Herring
[not found] ` <CAL_JsqKprnCn7JQj7QFbMbLW3Ei-paBH6RYti+CgEFCb4JUaAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-08 17:34 ` James Hogan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=527CE32F.6090305@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-metag@vger.kernel.org \
--cc=qais.yousef@imgtec.com \
--cc=qsyousef@gmail.com \
--cc=rob.herring@calxeda.com \
--cc=robherring2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).