From: Finn Thain <fthain@telegraphics.com.au>
Cc: Frank Rowand <frank.rowand@sony.com>,
Stan Johnson <userm57@yahoo.com>,
Rob Herring <robh+dt@kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Chintan Pandya <cpandya@codeaurora.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Date: Wed, 12 Sep 2018 10:15:23 +1000 (AEST) [thread overview]
Message-ID: <alpine.LNX.2.21.1809121015070.137@nippy.intranet> (raw)
In-Reply-To: <abb0dec2-da3a-2c04-0e9f-28851b22cf75@yahoo.com>
[The Cc list got pruned so I'm forwarding Stan's reply for the benefit of
the list archives and any other interested parties.]
On Mon, 10 Sep 2018, Stan Johnson wrote:
> On 9/10/18 6:53 AM, Rob Herring wrote:
>
> > ...
> > Can you try this patch (w/o Ben's patch). I think the problem is if
> > there are no phandles, then roundup_pow_of_two is passed 0 which is
> > documented as undefined result.
> >
> > Though, if a DT has no properties with phandles, then why are we doing a
> > lookup in the first place?
> >
> >
> > 8<----------------------------------------------------------------------
> >
> > diff --git a/drivers/of/base.c b/drivers/of/base.c
> > index 9095b8290150..74eaedd5b860 100644
> > --- a/drivers/of/base.c
> > +++ b/drivers/of/base.c
> > @@ -140,6 +140,9 @@ void of_populate_phandle_cache(void)
> > if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
> > phandles++;
> >
> > + if (!phandles)
> > + goto out;
> > +
> > cache_entries = roundup_pow_of_two(phandles);
> > phandle_cache_mask = cache_entries - 1;
> >
>
> Using the attached .config file, I first compiled the stock 4.18
> kernel from kernel.org; it hung at the Mac OS background screen
> on my Beige G3 Desktop using the BootX extension and the BootX.app
> from within MacOS. I then applied the above patch, and it booted
> without any problems from both the BootX extension and using the
> BootX.app from within MacOS.
>
> -Stan
>
>
prev parent reply other threads:[~2018-09-12 0:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1520208889-3908-1-git-send-email-frowand.list@gmail.com>
[not found] ` <1520208889-3908-2-git-send-email-frowand.list@gmail.com>
2018-08-30 0:44 ` v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle() Finn Thain
2018-08-30 1:05 ` Rob Herring
2018-08-31 2:39 ` Mac User
2018-08-31 4:35 ` Benjamin Herrenschmidt
2018-08-31 4:49 ` Benjamin Herrenschmidt
2018-08-31 12:28 ` Mac User
2018-08-31 23:36 ` Finn Thain
2018-09-01 4:54 ` Benjamin Herrenschmidt
2018-09-01 4:53 ` Benjamin Herrenschmidt
2018-08-31 4:49 ` Benjamin Herrenschmidt
2018-08-31 4:36 ` Frank Rowand
2018-08-31 4:58 ` Benjamin Herrenschmidt
2018-09-09 17:04 ` Benjamin Herrenschmidt
2018-09-09 23:52 ` Frank Rowand
2018-09-10 12:53 ` Rob Herring
2018-09-11 15:53 ` Frank Rowand
[not found] ` <abb0dec2-da3a-2c04-0e9f-28851b22cf75@yahoo.com>
2018-09-12 0:15 ` Finn Thain [this message]
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=alpine.LNX.2.21.1809121015070.137@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=benh@kernel.crashing.org \
--cc=cpandya@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=frank.rowand@sony.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=userm57@yahoo.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).