diff mbox

[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 (mailing list archive)
State Changes Requested
Delegated to: Michael Ellerman
Headers show

Commit Message

Benjamin Herrenschmidt March 6, 2015, 10:56 p.m. UTC
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> 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 ?

In the meantime, try that patch:

Comments

Steven Rostedt March 6, 2015, 11:07 p.m. UTC | #1
On Sat, 07 Mar 2015 09:56:22 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:


> In the meantime, try that patch:
> 

It boots for me.

Tested-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve
Olof Johansson March 6, 2015, 11:50 p.m. UTC | #2
On Fri, Mar 6, 2015 at 2:56 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> 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> 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 ?

FW updates on this platform are highly unlikely. Quirk it is.


-Olof
Benjamin Herrenschmidt March 7, 2015, 4:02 a.m. UTC | #3
On Fri, 2015-03-06 at 15:50 -0800, Olof Johansson wrote:
> On Fri, Mar 6, 2015 at 2:56 PM, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
> > 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> 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 ?
> 
> FW updates on this platform are highly unlikely. Quirk it is.

Oh I was not expecting a new FW, I was mostly wondering whether Steven
had the latest one since I *think* Michael has been testing with the
PA board we got here and didn't see that problem ... anyway, I'll check
with him early next week and clean up / submit that patch.

Cheers,
Ben.

> 
> -Olof
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
Michael Ellerman March 10, 2015, 12:28 a.m. UTC | #4
On Sat, 2015-03-07 at 15:02 +1100, Benjamin Herrenschmidt wrote:
> On Fri, 2015-03-06 at 15:50 -0800, Olof Johansson wrote:
> > On Fri, Mar 6, 2015 at 2:56 PM, Benjamin Herrenschmidt
> > <benh@kernel.crashing.org> wrote:
> > > 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> 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 ?
> > 
> > FW updates on this platform are highly unlikely. Quirk it is.
> 
> Oh I was not expecting a new FW, I was mostly wondering whether Steven
> had the latest one since I *think* Michael has been testing with the
> PA board we got here and didn't see that problem ... anyway, I'll check
> with him early next week and clean up / submit that patch.

Yeah I have been testing semi-regularly.

4.0-rc2 boots fine on mine.

But mine is an Athena, Steve's is an Electra. So they're not identical.

Mine is running:

  CFE version PAS-2.0.29 for ATHENA (64bit,MP,BE,PPC)
  Build Date: Mon Jun 30 11:47:25 PDT 2008 (mpl@mitch-1)

Steve is your CFE older than that?

Olof do you remember if that version or something newer is available for
Electra?

cheers
Olof Johansson March 10, 2015, 12:33 a.m. UTC | #5
On Mon, Mar 9, 2015 at 5:28 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> On Sat, 2015-03-07 at 15:02 +1100, Benjamin Herrenschmidt wrote:
>> On Fri, 2015-03-06 at 15:50 -0800, Olof Johansson wrote:
>> > On Fri, Mar 6, 2015 at 2:56 PM, Benjamin Herrenschmidt
>> > <benh@kernel.crashing.org> wrote:
>> > > 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> 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 ?
>> >
>> > FW updates on this platform are highly unlikely. Quirk it is.
>>
>> Oh I was not expecting a new FW, I was mostly wondering whether Steven
>> had the latest one since I *think* Michael has been testing with the
>> PA board we got here and didn't see that problem ... anyway, I'll check
>> with him early next week and clean up / submit that patch.
>
> Yeah I have been testing semi-regularly.
>
> 4.0-rc2 boots fine on mine.
>
> But mine is an Athena, Steve's is an Electra. So they're not identical.

I have a chitra in my boot farm, so I run every build I do on it. I
have not hit it either, which confused me.

Turns out that Steven's machine boots with idle=doze, which is the
part that makes all the difference.


FWIW, the three machines have roughly these diffs:

* Electra: First development/eval board. Funky USB on localbus, plenty
of PCI-e. Two GigE, one 10GigE XAUI. CompactFlash and IDE on localbus
too. Usually shipped with a PCI-e SATA card and a USB card.

* Chitra: Second edition dev/eval board. Moved SATA and USB on-board,
and removed some of the localbus hardware. Might have routed three
GigE out instead of 2, can't remember.

* Athena: Never released board with a smaller package chip, there's
only a few of these around. Can't comment too much on the specifics,
but it's similar to Chitra, and the silicon is the same.

> Mine is running:
>
>   CFE version PAS-2.0.29 for ATHENA (64bit,MP,BE,PPC)
>   Build Date: Mon Jun 30 11:47:25 PDT 2008 (mpl@mitch-1)
>
> Steve is your CFE older than that?
>
> Olof do you remember if that version or something newer is available for
> Electra?

That looks about as new as they come. My board runs a .29 too.


-Olof
Christian Zigotzky March 10, 2015, 6:57 a.m. UTC | #6
On 10/03/2015 01:33 a.m., Olof Johansson wrote:

* Electra: First development/eval board. Funky USB on localbus, plenty
of PCI-e. Two GigE, one 10GigE XAUI. CompactFlash and IDE on localbus
too. Usually shipped with a PCI-e SATA card and a USB card.

* Chitra: Second edition dev/eval board. Moved SATA and USB on-board,
and removed some of the localbus hardware. Might have routed three
GigE out instead of 2, can't remember.

* Athena: Never released board with a smaller package chip, there's
only a few of these around. Can't comment too much on the specifics,
but it's similar to Chitra, and the silicon is the same.

----

@All

FYI:

* Nemo: Released as AmigaONE X1000. With co-processor: "Xena" 500 MHz 
XCore XS1-L2 124 SDS
and SB600 southbridge.

Linux support:

http://forum.hyperion-entertainment.biz/viewforum.php?f=35&sid=7849bde9bae455730f3b95ad207bb6e9
http://www.supertuxkart-amiga.de/amiga/x1000.html

Is still in stock: http://amigakit.leamancomputing.com/x1000/?webpage=buy.

It means you could buy a new PA6T system with active Linux support. It 
runs the latest kernel 4.0-rc3
and the new ubuntu MATE 15.04 PowerPC on this board.

>> Mine is running:
>>
>>    CFE version PAS-2.0.29 for ATHENA (64bit,MP,BE,PPC)
>>    Build Date: Mon Jun 30 11:47:25 PDT 2008 (mpl@mitch-1)
>>
>>
FYI: Nemo: CFE version PAS-2.0.30

Rgds,

Christian
Steven Rostedt March 10, 2015, 5:03 p.m. UTC | #7
On Tue, 10 Mar 2015 11:28:03 +1100
Michael Ellerman <mpe@ellerman.id.au> wrote:

> 
> Mine is running:
> 
>   CFE version PAS-2.0.29 for ATHENA (64bit,MP,BE,PPC)
>   Build Date: Mon Jun 30 11:47:25 PDT 2008 (mpl@mitch-1)
> 
> Steve is your CFE older than that?

Seems so:

CFE version PAS-2.0.20 for ELECTRA (64bit,MP,BE,PPC)
Build Date: Tue Nov  6 22:35:48 PST 2007 (mpl@mitch-1)

-- Steve
Michael Ellerman March 22, 2015, 11:52 p.m. UTC | #8
On Mon, 2015-03-09 at 17:33 -0700, Olof Johansson wrote:
> On Mon, Mar 9, 2015 at 5:28 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> > On Sat, 2015-03-07 at 15:02 +1100, Benjamin Herrenschmidt wrote:
> >> On Fri, 2015-03-06 at 15:50 -0800, Olof Johansson wrote:
> >> > On Fri, Mar 6, 2015 at 2:56 PM, Benjamin Herrenschmidt
> >> > <benh@kernel.crashing.org> wrote:
> >> > > 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> 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 ?
> >> >
> >> > FW updates on this platform are highly unlikely. Quirk it is.
> >>
> >> Oh I was not expecting a new FW, I was mostly wondering whether Steven
> >> had the latest one since I *think* Michael has been testing with the
> >> PA board we got here and didn't see that problem ... anyway, I'll check
> >> with him early next week and clean up / submit that patch.
> >
> > Yeah I have been testing semi-regularly.
> >
> > 4.0-rc2 boots fine on mine.
> >
> > But mine is an Athena, Steve's is an Electra. So they're not identical.
> 
> I have a chitra in my boot farm, so I run every build I do on it. I
> have not hit it either, which confused me.
> 
> Turns out that Steven's machine boots with idle=doze, which is the
> part that makes all the difference.

Aha, that is the key.

So mine also crashes with idle=doze, even with the newer firmware.

So we'll have to fix this with the quirk in the kernel.

cheers
diff mbox

Patch

diff --git a/drivers/of/address.c b/drivers/of/address.c
index ad29069..78a7dcb 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -450,12 +450,17 @@  static struct of_bus *of_match_bus(struct device_node *np)
 	return NULL;
 }
 
-static int of_empty_ranges_quirk(void)
+static int of_empty_ranges_quirk(struct device_node *np)
 {
 	if (IS_ENABLED(CONFIG_PPC)) {
-		/* To save cycles, we cache the result */
+		/* To save cycles, we cache the result for global "Mac" setting */
 		static int quirk_state = -1;
 
+		/* PA-SEMI sdc DT bug */
+		if (of_device_is_compatible(np, "1682m-sdc"))
+			return true;
+
+		/* Make quirk cached */
 		if (quirk_state < 0)
 			quirk_state =
 				of_machine_is_compatible("Power Macintosh") ||
@@ -490,7 +495,7 @@  static int of_translate_one(struct device_node *parent, struct of_bus *bus,
 	 * This code is only enabled on powerpc. --gcl
 	 */
 	ranges = of_get_property(parent, rprop, &rlen);
-	if (ranges == NULL && !of_empty_ranges_quirk()) {
+	if (ranges == NULL && !of_empty_ranges_quirk(parent)) {
 		pr_debug("OF: no ranges; cannot translate\n");
 		return 1;
 	}