From: Christian Zigotzky <chzigotzky@xenosoft.de>
To: Alex Perez <aperez@alexperez.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [REGRESSION in 3.18][PPC] PA Semi fails to boot after: of/base: Fix PowerPC address parsing hack
Date: Sat, 07 Mar 2015 10:12:45 +0100 [thread overview]
Message-ID: <54FAC10D.6080207@xenosoft.de> (raw)
In-Reply-To: <49C58FDD-0206-4357-8CD2-46F3F7E4E739@alexperez.com>
[-- Attachment #1: Type: text/plain, Size: 3230 bytes --]
Hi All,
I have a patch for it (Kernel 4.0-rc2):
diff -rupN linux-4.0/drivers/of/address.c
linux-4.0-nemo/drivers/of/address.c
--- linux-4.0/drivers/of/address.c 2015-03-03 18:04:59.000000000 +0100
+++ linux-4.0-nemo/drivers/of/address.c 2015-03-03 22:34:00.037500744
+0100
@@ -450,21 +450,6 @@ static struct of_bus *of_match_bus(struc
return NULL;
}
-static int of_empty_ranges_quirk(void)
-{
- if (IS_ENABLED(CONFIG_PPC)) {
- /* To save cycles, we cache the result */
- static int quirk_state = -1;
-
- if (quirk_state < 0)
- quirk_state =
- of_machine_is_compatible("Power Macintosh") ||
- of_machine_is_compatible("MacRISC");
- return quirk_state;
- }
- return false;
-}
-
static int of_translate_one(struct device_node *parent, struct of_bus
*bus,
struct of_bus *pbus, __be32 *addr,
int na, int ns, int pna, const char *rprop)
@@ -490,10 +475,12 @@ static int of_translate_one(struct devic
* This code is only enabled on powerpc. --gcl
*/
ranges = of_get_property(parent, rprop, &rlen);
- if (ranges == NULL && !of_empty_ranges_quirk()) {
+#if !defined(CONFIG_PPC)
+ if (ranges == NULL) {
pr_debug("OF: no ranges; cannot translate\n");
return 1;
}
+#endif /* !defined(CONFIG_PPC) */
if (ranges == NULL || rlen == 0) {
offset = of_read_number(addr, na);
memset(addr, 0, pna * 4);
Rgds,
Christian
On 07/03/2015 01:16 a.m., Alex Perez wrote:
> On Mar 6, 2015, at 3:07 PM, linuxppc-dev-request@lists.ozlabs.org
> <mailto:linuxppc-dev-request@lists.ozlabs.org> wrote:
>
>> Date: Sat, 07 Mar 2015 09:56:22 +1100
>> From: Benjamin Herrenschmidt <benh@kernel.crashing.org
>> <mailto:benh@kernel.crashing.org>>
>> To: Steven Rostedt <rostedt@goodmis.org <mailto:rostedt@goodmis.org>>
>> Cc: Grant Likely <grant.likely@linaro.org
>> <mailto:grant.likely@linaro.org>>, Rob Herring
>> <robh@kernel.org <mailto:robh@kernel.org>>, Olof Johansson
>> <olof@lixom.net <mailto:olof@lixom.net>>,
>> linuxppc-dev@lists.ozlabs.org <mailto:linuxppc-dev@lists.ozlabs.org>,
>> LKML <linux-kernel@vger.kernel.org <mailto:linux-kernel@vger.kernel.org>>
>> Subject: Re: [REGRESSION in 3.18][PPC] PA Semi fails to boot after:
>> of/base: Fix PowerPC address parsing hack
>> Message-ID: <1425682582.4636.197.camel@kernel.crashing.org
>> <mailto:1425682582.4636.197.camel@kernel.crashing.org>>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> On Fri, 2015-03-06 at 10:00 -0500, Steven Rostedt wrote:
>>> On Fri, 06 Mar 2015 15:18:42 +1100
>>> Benjamin Herrenschmidt <benh@kernel.crashing.org
>>> <mailto:benh@kernel.crashing.org>> wrote:
>>>
>>>
>>>> Can you shoot me the DT (/proc/device-tree in a tarball) ?
>>>
>>> Attached.
>>
>> This is indeed a bug in their DT. We might want to add quirks for
>> that unless it can be fixed (or has been via FW update). Olof ?
>
> I will of course ultimately defer to Olof, but PASemi hasn’t existed
> for years, and there is no entity which could possibly update the DT
> for these reference PASemi development boards, unless Olof has source,
> which I’m pretty sure he does not :)
[-- Attachment #2: Type: text/html, Size: 24326 bytes --]
next prev parent reply other threads:[~2015-03-07 9:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.412.1425683254.7605.linuxppc-dev@lists.ozlabs.org>
2015-03-07 0:16 ` [REGRESSION in 3.18][PPC] PA Semi fails to boot after: of/base: Fix PowerPC address parsing hack Alex Perez
2015-03-07 8:27 ` Benjamin Herrenschmidt
2015-03-08 20:19 ` Olof Johansson
2015-03-07 9:12 ` Christian Zigotzky [this message]
2015-03-05 22:12 Steven Rostedt
2015-03-06 4:18 ` Benjamin Herrenschmidt
2015-03-06 15:00 ` Steven Rostedt
2015-03-06 22:56 ` Benjamin Herrenschmidt
2015-03-06 23:07 ` Steven Rostedt
2015-03-06 23:50 ` Olof Johansson
2015-03-07 4:02 ` Benjamin Herrenschmidt
2015-03-10 0:28 ` Michael Ellerman
2015-03-10 0:33 ` Olof Johansson
2015-03-10 6:57 ` Christian Zigotzky
2015-03-22 23:52 ` Michael Ellerman
2015-03-10 17:03 ` Steven Rostedt
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=54FAC10D.6080207@xenosoft.de \
--to=chzigotzky@xenosoft.de \
--cc=aperez@alexperez.com \
--cc=linuxppc-dev@lists.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;
as well as URLs for NNTP newsgroup(s).