All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "BALATON Zoltan" <balaton@eik.bme.hu>, <qemu-devel@nongnu.org>,
	<qemu-ppc@nongnu.org>
Cc: "Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>
Subject: Re: [PATCH v2] ppc/vof: Make nextprop behave more like Open Firmware
Date: Tue, 01 Apr 2025 13:29:04 +1000	[thread overview]
Message-ID: <D8UZF6NLQG6W.3IBC5MPZBFZ1J@gmail.com> (raw)
In-Reply-To: <20250331142627.BAA2F4E6029@zero.eik.bme.hu>

On Tue Apr 1, 2025 at 12:26 AM AEST, BALATON Zoltan wrote:
> The FDT does not normally store name properties but reconstructs it
> from path but each node in Open Firmware should at least have this
> property. This is correctly handled in getprop but nextprop should
> also return it even if not present as a property. This patch fixes
> that and also skips phandle which does not appear in Open Firmware
> and only added for internal use by VOF.
>
> Explicit name properties are still allowed because they are needed
> e.g. on the root node that guests expect to have specific names as
> seen on real machines instead of being empty so sometimes the node
> name may need to be overriden.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
> I've tested this with pegasos2 but don't know how to test spapr.

Boot a pseries machine with pseries (book3s 64-bit) Linux kernel
with x-vof=on option.

AFAIKS the two places Linux calls nextprop look like this

               if (call_prom("nextprop", 3, 1, node, prev_name,
                              pname) != 1)
                        break;

                /* skip "name" */
                if (prom_strcmp(pname, "name") == 0) {
                        prev_name = "name";
                        continue;
                }

So, seems like skipping name is okay?

After iterating through properties it also has this:

        /* Add a "phandle" property if none already exist */
        if (!has_phandle) {
                soff = dt_find_string("phandle");
                if (soff == 0)
                        prom_printf("WARNING: Can't find string index for <phandle> node %s\n", path);

That warning does not seem to fire after your patch.

spapr *seems* to be okay booting, but I would not be inclined to
take this for 10.0 at least without review from someone who knows
more than I do about OF since there can be subtle breakage.

What actual problem is it causing for pegasos?

Thanks,
Nick


  reply	other threads:[~2025-04-01  3:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 14:26 [PATCH v2] ppc/vof: Make nextprop behave more like Open Firmware BALATON Zoltan
2025-04-01  3:29 ` Nicholas Piggin [this message]
2025-04-01 12:23   ` BALATON Zoltan
2025-04-04  3:00 ` Alexey Kardashevskiy
2025-04-05  0:09   ` BALATON Zoltan
2025-04-08 10:58     ` Alexey Kardashevskiy

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=D8UZF6NLQG6W.3IBC5MPZBFZ1J@gmail.com \
    --to=npiggin@gmail.com \
    --cc=aik@ozlabs.ru \
    --cc=balaton@eik.bme.hu \
    --cc=danielhb413@gmail.com \
    --cc=harshpb@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.