From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH] PPC: Skip over OF_DT_NOP when unflattening the device tree
Date: Fri, 19 Mar 2010 16:50:38 +1100 [thread overview]
Message-ID: <1268977838.8599.53.camel@pasglop> (raw)
In-Reply-To: <20100309193021.GD30462@obsidianresearch.com>
On Tue, 2010-03-09 at 12:30 -0700, Jason Gunthorpe wrote:
> NOPs within the property section are skipped, but NOPs between
> OF_DT_END_NODE and OF_DT_BEGIN_NODE were not. My firmware NOPs out
> entire nodes depending on various environment parameters.
>
> of_scan_flat_dt already handles NOP more generally..
Good catch, though that code has now moved over to drivers/of
and is a bit different. Grant is going to fix it up though.
Cheers,
Ben.
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> ---
> arch/powerpc/kernel/prom.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 4ec3008..92137b2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -408,8 +408,11 @@ static unsigned long __init unflatten_dt_node(unsigned long mem,
> if (!np->type)
> np->type = "<NULL>";
> }
> - while (tag == OF_DT_BEGIN_NODE) {
> - mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize);
> + while (tag == OF_DT_BEGIN_NODE || tag == OF_DT_NOP) {
> + if (tag == OF_DT_NOP)
> + *p += 4;
> + else
> + mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize);
> tag = *((u32 *)(*p));
> }
> if (tag != OF_DT_END_NODE) {
next prev parent reply other threads:[~2010-03-19 5:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 19:30 [PATCH] PPC: Skip over OF_DT_NOP when unflattening the device tree Jason Gunthorpe
2010-03-19 5:50 ` Benjamin Herrenschmidt [this message]
2010-03-19 6:06 ` Jason Gunthorpe
2010-03-19 6:18 ` Grant Likely
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=1268977838.8599.53.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=grant.likely@secretlab.ca \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/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