From: Andrea della Porta <andrea.porta@suse.com>
To: Rob Herring <robh@kernel.org>
Cc: Herve Codina <herve.codina@bootlin.com>,
Andrea della Porta <andrea.porta@suse.com>,
Bjorn Helgaas <helgaas@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
mbrugger@suse.com, guillaume.gardet@arm.com, tiwai@suse.com,
Lizhi Hou <lizhi.hou@amd.com>
Subject: Re: [PATCH v2] PCI: of: Downgrade error message on missing of_root node
Date: Mon, 9 Feb 2026 19:19:34 +0100 [thread overview]
Message-ID: <aYolNrRSU_IlgAFn@apocalypse> (raw)
In-Reply-To: <CAL_JsqJ_gCu_A2YqX4r2UMWssJ=4FprsM_Os3Zw=V8yCTGubdA@mail.gmail.com>
Hi,
On 07:58 Fri 05 Dec , Rob Herring wrote:
> On Fri, Nov 7, 2025 at 5:58 AM Herve Codina <herve.codina@bootlin.com> wrote:
> >
> > Hi Andrea, Bjorn,
> >
> > On Fri, 7 Nov 2025 10:32:35 +0100
> > Andrea della Porta <andrea.porta@suse.com> wrote:
> >
> > > Hi Bjorn,
> > >
> > > On 11:50 Thu 06 Nov , Bjorn Helgaas wrote:
> > > > On Thu, Nov 06, 2025 at 06:27:08PM +0100, Herve Codina wrote:
> > > > > On Thu, 6 Nov 2025 16:21:47 +0100
> > > > > Andrea della Porta <andrea.porta@suse.com> wrote:
> > > > > > On 13:18 Thu 06 Nov , Herve Codina wrote:
> > > > > > > On Thu, 6 Nov 2025 12:04:07 +0100
> > > > > > > Andrea della Porta <andrea.porta@suse.com> wrote:
> > > > > > > > On 18:23 Wed 05 Nov , Bjorn Helgaas wrote:
> > > > > > > > > On Wed, Nov 05, 2025 at 07:33:40PM +0100, Andrea della Porta wrote:
> > > > Patch at https://lore.kernel.org/r/955bc7a9b78678fad4b705c428e8b45aeb0cbf3c.1762367117.git.andrea.porta@suse.com,
> > > > added back for reference:
> > > >
> > > > diff --git a/drivers/pci/of.c b/drivers/pci/of.c
> > > > index 3579265f1198..872c36b195e3 100644
> > > > --- a/drivers/pci/of.c
> > > > +++ b/drivers/pci/of.c
> > > > @@ -775,7 +775,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge)
> > > >
> > > > /* Check if there is a DT root node to attach the created node */
> > > > if (!of_root) {
> > > > - pr_err("of_root node is NULL, cannot create PCI host bridge node\n");
> > > > + pr_info("Missing DeviceTree, cannot create PCI host bridge node\n");
> > > > return;
> > > > }
> > > >
> > > > > > > > > > When CONFIG_PCI_DYNAMIC_OF_NODES is enabled, an error
> > > > > > > > > > message is generated if no 'of_root' node is defined.
> > > > > > > > > >
> > > > > > > > > > On DT-based systems, this cannot happen as a root DT node
> > > > > > > > > > is always present. On ACPI-based systems, this is not a
> > > > > > > > > > true error because a DT is not used.
> > > > > > > > > >
> > > > > > > > > > Downgrade the pr_err() to pr_info() and reword the message
> > > > > > > > > > text to be less context specific.
> > > > > > > > >
> > > > > > > > > of_pci_make_host_bridge_node() is called in the very generic
> > > > > > > > > pci_register_host_bridge() path. Does that mean every boot
> > > > > > > > > of a kernel with CONFIG_PCI_DYNAMIC_OF_NODES on a non-DT
> > > > > > > > > system will see this message?
> > > > > > > >
> > > > > > > > This is the case, indeed. That's why downgrading to info seems
> > > > > > > > sensible.
> > > > > > > >
> > > > > > > > > This message seems like something that will generate user
> > > > > > > > > questions. Or is this really an error, and we were supposed
> > > > > > > > > to have created of_root somewhere but it failed? If so, I
> > > > > > > > > would expect a message where the of_root creation failed.
> > > >
> > > > I think we should just remove the message completely. I don't want
> > > > users to enable CONFIG_PCI_DYNAMIC_OF_NODES out of curiosity or
> > > > willingness to test, and then ask about this message.
>
> No, please keep it. Anyone that enables CONFIG_PCI_DYNAMIC_OF_NODES
> should know what they are doing. I was thinking it should be hidden
> behind EXPERT perhaps.
Ok, so it seems that this message is there to stay, can we just turn
it to a warning to relieve pressure?
Thanks,
Andrea
>
> > >
> > > Agreed. This would be the easy solution, the other being creating the
> > > empty DT so that the message will never be printed. But this require some
> > > careful thought. The latter solution will be needed if we'll ever want to
> > > make drivers like RP1 or lan96xx (which uses the runtime overlay) to work.
> > >
> > > >
> > > > "You can avoid the message by also enabling CONFIG_OF_EARLY_FLATTREE"
> > > > is not a very satisfactory answer.
> > >
> > > Unfortunately this would work on x86, but not on arm. And who knows on
> > > other platforms.
> > >
> > > >
> > > > A message at the point of *needing* this, i.e., when loading an
> > > > overlay fails for lack of this dynamic DT, is fine.
> > >
> > > It seems fine to me.
> > >
> >
> > Ok, even if I would prefer having an empty (or not) of_node available on all
> > platforms, what is proposed makes sense especially in regards to potential
> > users questions.
>
> Having a DT always available was the original intent, but the arm64
> maintainers resisted so that's a fight for another day when someone
> really wants to use this on an ACPI system. Now riscv has done the
> same thing unfortunately.
>
> Rob
next prev parent reply other threads:[~2026-02-09 18:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 18:33 [PATCH v2] PCI: of: Downgrade error message on missing of_root node Andrea della Porta
2025-11-06 0:23 ` Bjorn Helgaas
2025-11-06 11:04 ` Andrea della Porta
2025-11-06 12:18 ` Herve Codina
2025-11-06 15:21 ` Andrea della Porta
2025-11-06 17:27 ` Herve Codina
2025-11-06 17:50 ` Bjorn Helgaas
2025-11-07 9:32 ` Andrea della Porta
2025-11-07 11:58 ` Herve Codina
2025-12-05 13:58 ` Rob Herring
2026-02-09 18:19 ` Andrea della Porta [this message]
2025-11-07 9:26 ` Andrea della Porta
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=aYolNrRSU_IlgAFn@apocalypse \
--to=andrea.porta@suse.com \
--cc=bhelgaas@google.com \
--cc=guillaume.gardet@arm.com \
--cc=helgaas@kernel.org \
--cc=herve.codina@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=mbrugger@suse.com \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
/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.