devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Russell King - ARM Linux <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
Cc: Frank Rowand
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Javier Martinez Canillas
	<javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>,
	Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v2] ARM: dts: imx: Pass 'chosen' and 'memory' nodes
Date: Mon, 30 Jan 2017 20:47:38 +0100	[thread overview]
Message-ID: <20170130194738.edzou2mgvcoegucx@pengutronix.de> (raw)
In-Reply-To: <20170130185444.GF27312-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>

Hello,

On Mon, Jan 30, 2017 at 06:54:44PM +0000, Russell King - ARM Linux wrote:
> On Wed, Jan 25, 2017 at 01:13:23PM -0800, Frank Rowand wrote:
> > Adding back the chosen nodes is a bandaid that papers over the actual bug
> > in the decompressor.
> > 
> > A comment about Fabio's attempt to fix the decompressor noted a possible
> > issue with the method taken to fix the problem, but then the discussion
> > of fixing the decompressor was dropped and v3 of the patch to add chosen
> > into a bunch of .dtsi files was applied by Shawn.
> > 
> > Can someone please help Fabio to create a correct patch to fix the
> > decompressor?
> 
> I refuse to assist, see below.
> 
> The reason this has come up is that this problem has _nothing_ to do
> with the decompressor - see recent context on the linux-arm-kernel
> list.

Several people reported problems with the patch that removes
skeleton.dtsi. There are at least:

 - Russell, who saw U-Boot failing to specify the amount of RAM;
 - somebody (I forgot and I'm lazy so I didn't look up the name) who
   noticed some i.MX6 boards fail in kernelci with barebox because
   barebox assumed /chosen to be present; and
 - somebody else (...) who reported the ATAGS_DTB_COMPAT failure
   (also wrongly called "decompressor failure" in this thread).

I agree that for each single of the above issues it is worth to readd
the /chosen and /memory nodes for now. Still all three are IMHO worth to
be fixed.

barebox is already fixed in v2017.01.0 (commit f49b415b9231 (of: base:
add chosen node if it does not exist when adding initrd),
https://git.pengutronix.de/cgit/barebox/commit/?id=f49b415b9231).

Looking at the ATAGS_DTB_COMPAT problem: The code in question is
(if I understood correctly) merge_fdt_bootargs in
arch/arm/boot/compressed/atags_to_fdt.c:

	setprop_string(fdt, "/chosen", "bootargs", cmdline);

looking further:

	static int node_offset(void *fdt, const char *node_path)
	{       
		int offset = fdt_path_offset(fdt, node_path);
		if (offset == -FDT_ERR_NOTFOUND)
			offset = fdt_add_subnode(fdt, 0, node_path);
		return offset;
	}

	static int setprop_string(void *fdt, const char *node_path,
				  const char *property, const char *string)
	{
		int offset = node_offset(fdt, node_path);
		if (offset < 0)
			return offset;
		return fdt_setprop_string(fdt, offset, property, string);
	}

So it seems "/chosen" not being there should be handled. I don't have a
reproducer for this problem, but it doesn't look that hard to fix with
DEBUG_LL and a system that shows the problem.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-01-30 19:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 14:02 [PATCH v2] ARM: dts: imx: Pass 'chosen' and 'memory' nodes Fabio Estevam
2017-01-19 14:13 ` Uwe Kleine-König
2017-01-19 14:35   ` Fabio Estevam
     [not found]     ` <CAOMZO5AdgM9eFnerLRdYxwE7gsOE5OvkWs6rCR4zta1XmXHj1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-19 14:46       ` Uwe Kleine-König
2017-01-19 14:56         ` Russell King - ARM Linux
2017-01-19 15:57           ` Fabio Estevam
2017-01-19 16:14           ` Uwe Kleine-König
     [not found]             ` <20170119161441.jcctgig7np4v7sam-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-01-25 21:13               ` Frank Rowand
     [not found]                 ` <588914F3.7050909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-25 22:46                   ` Rob Herring
     [not found]                     ` <CAL_JsqL4+OZo0JTU8gnTEHxqNgNoBRnuHr1i99n72BKG30V9Eg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-26  0:30                       ` Frank Rowand
2017-01-30 18:54                 ` Russell King - ARM Linux
     [not found]                   ` <20170130185444.GF27312-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-01-30 19:07                     ` Fabio Estevam
2017-01-30 19:47                     ` Uwe Kleine-König [this message]
2017-02-01 13:30                     ` Stefan Wahren
2017-02-06 10:49                       ` Stefan Wahren
     [not found]                         ` <13787b59-6bfc-d020-9853-ae37074009dc-eS4NqCHxEME@public.gmane.org>
2017-02-06 11:05                           ` Fabio Estevam
2017-02-07 15:19                             ` Arnd Bergmann

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=20170130194738.edzou2mgvcoegucx@pengutronix.de \
    --to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=fabio.estevam-3arQi8VN3Tc@public.gmane.org \
    --cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).