is there still any need PPC checking for "chosen@0"?

2 messages, 2 authors, 2018-08-08 · open the first message on its own page

is there still any need PPC checking for "chosen@0"?

From: Robert P. J. Day <hidden>
Date: 2018-08-06 16:59:51

  given that there are no .dts files in the current kernel code base
that define the node name "/chosen@0" instead of the proper "/chosen",
is there any need for arch/powerpc/boot/oflib.c to still make this
test:

        chosen = of_finddevice("/chosen");
        if (chosen == (phandle) -1) {
                chosen = of_finddevice("/chosen@0");   <--- this
                if (chosen == (phandle) -1) {
                        printf("no chosen\n");
                        return 0;
                }
        }

are there still PPC machines that require the recognition of
"/chosen@0"?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

Re: is there still any need PPC checking for "chosen@0"?

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-08-08 13:58:59

"Robert P. J. Day" [off-list ref] writes:
  given that there are no .dts files in the current kernel code base
that define the node name "/chosen@0" instead of the proper "/chosen",
A good portion of PPC machines get their device tree from firmware, not
from a dts that's in the kernel tree, so that's not a good indication.
is there any need for arch/powerpc/boot/oflib.c to still make this
test:

        chosen = of_finddevice("/chosen");
        if (chosen == (phandle) -1) {
                chosen = of_finddevice("/chosen@0");   <--- this
                if (chosen == (phandle) -1) {
                        printf("no chosen\n");
                        return 0;
                }
        }

are there still PPC machines that require the recognition of
"/chosen@0"?
It was added by Paul in:

66a45dd3620e ("powerpc: Make COFF zImages for old 32-bit powermacs")

So presumably there's an old powermac somewhere that needs it.

Given it's basically 2 extra lines of code I'd be inclined to leave it
alone.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help