Skip to contentSkip to conversation

PA Semi fails to boot after: of/base: Fix PowerPC address parsing hack

REGRESSION in 3.18 Alex Perez 4 participants 4 messages Mar 7, 2015 – Mar 8, 2015 1 message not in the archive Device tree

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Alex Perez

author
#1 lore raw
Quoted 16 lines · On Mar 6, 2015, at 3:07 PM, [email protected] wrote:

Date: Sat, 07 Mar 2015 09:56:22 +1100
From: Benjamin Herrenschmidt <[email protected]>
To: Steven Rostedt <[email protected]>
Cc: Grant Likely <[email protected]>, Rob Herring
<[email protected]>, Olof Johansson <[email protected]>, [email protected], LKML <[email protected]>
Subject: Re: [REGRESSION in 3.18][PPC] PA Semi fails to boot after:
of/base: Fix PowerPC address parsing hack
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"

Quoted 4 lines · Steven Rostedt

On Fri, 06 Mar 2015 15:18:42 +1100
Benjamin Herrenschmidt <[email protected]> wrote:

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

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 :)

#2 lore raw
Quoted 4 lines · Alex Perez

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 :)

As I mentioned earlier, that's not what I had in mind :-) I was simply wondering whether an existing newer FW with a fix already existed but in any case, I'll submit the quirk next week, it doesn't hurt and is pretty simple and localized.

Cheers,
Ben.

#3 lore raw
Quoted 3 lines · Benjamin Herrenschmidt
Quoted 1 line · Alex Perez

I will of course ultimately defer to Olof, but PASemi hasn=E2=80=99t exi=

sted

Quoted 8 lines
Quoted 3 lines

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=E2=80=99m pretty sure he does not :)

As I mentioned earlier, that's not what I had in mind :-) I was simply wondering whether an existing newer FW with a fix already existed but in any case, I'll submit the quirk next week, it doesn't hurt and is pretty simple and localized.

I doubt it -- it has definitely been a while but I have no memory of having made any fixes to DT contents around there.

As far as access to FW sources, etc: I can't really do much on that front either.

-Olof

#4 lore raw
In reply to Alex Perez

Hi All,

I have a patch for it (Kernel 4.0-rc2):

drivers/of/address.c 2015-03-03 22:34:00.037500744 +0100 renamed from drivers/of/address.c 2015-03-03 18:04:59.000000000 +0100 +0 -15
diff -rupN linux-4.0/drivers/of/address.c linux-4.0-nemo/drivers/of/address.c
@@ -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

Quoted 26 lines · Alex Perez
Quoted 16 lines · On Mar 6, 2015, at 3:07 PM, [email protected]…

Date: Sat, 07 Mar 2015 09:56:22 +1100
From: Benjamin Herrenschmidt <[email protected] <mailto:[email protected]>>
To: Steven Rostedt <[email protected] <mailto:[email protected]>>
Cc: Grant Likely <[email protected] <mailto:[email protected]>>, Rob Herring
<[email protected] <mailto:[email protected]>>, Olof Johansson <[email protected] <mailto:[email protected]>>, [email protected] <mailto:[email protected]>, LKML <[email protected] <mailto:[email protected]>>
Subject: Re: [REGRESSION in 3.18][PPC] PA Semi fails to boot after:
of/base: Fix PowerPC address parsing hack
Message-ID: <[email protected] <mailto:[email protected]>>
Content-Type: text/plain; charset="UTF-8"

Quoted 4 lines · Steven Rostedt

On Fri, 06 Mar 2015 15:18:42 +1100
Benjamin Herrenschmidt <[email protected] <mailto:[email protected]>> wrote:

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

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 :)