From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [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@n2100.armlinux.org.uk>
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/ |
next prev 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
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
2017-01-25 21:13 ` Frank Rowand
2017-01-25 22:46 ` Rob Herring
2017-01-26 0:30 ` Frank Rowand
2017-01-30 18:54 ` Russell King - ARM Linux
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
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@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).