mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	Yunsheng Lin <linyunsheng@huawei.com>,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH] PCI: Remove warning about host bridge on unknown NUMA node
Date: Wed,  4 Mar 2026 18:21:28 -0600	[thread overview]
Message-ID: <20260305002128.51147-1-bhelgaas@google.com> (raw)

ad5086108b9f ("PCI: Warn if no host bridge NUMA node info") added warnings
like this when there are multiple NUMA nodes and we discover a PCI host
bridge where no node is specified, e.g., there's no ACPI _PXM method or DT
"numa-node-id" property:

  pci_bus 0000:ff: Unknown NUMA node; performance will be reduced

The hope was that the message would encourage vendors to add NUMA node
information to their firmware or DTs, but that hasn't happened.  The
message just leads to bug reports that we can't do anything about.

In some cases BIOS has _PXM methods for some bridges but not others, which
suggests that the vendor thinks node information isn't useful to the OS,
e.g., maybe there are no real devices below the bridge.

Remove the warning message when the NUMA node is unknown.  If it is known,
include it in an existing message:

  PCI host bridge to bus 0000:00 NUMA node 0

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218951
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/probe.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index bccc7a4bdd79..e3e81926a6f3 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -993,9 +993,9 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
 	LIST_HEAD(resources);
 	struct resource *res, *next_res;
 	bool bus_registered = false;
-	char addr[64], *fmt;
+	char numa[32], addr[64], *fmt;
 	const char *name;
-	int err;
+	int err, node;
 
 	bus = pci_alloc_bus(NULL);
 	if (!bus)
@@ -1071,13 +1071,17 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
 	/* Create legacy_io and legacy_mem files for this bus */
 	pci_create_legacy_files(bus);
 
+	numa[0] = '\0';
+	if (nr_node_ids > 1) {
+		node = pcibus_to_node(bus);
+		if (node != NUMA_NO_NODE)
+			snprintf(numa, sizeof(numa), " on NUMA node %u", node);
+	}
+
 	if (parent)
-		dev_info(parent, "PCI host bridge to bus %s\n", name);
+		dev_info(parent, "PCI host bridge to bus %s%s\n", name, numa);
 	else
-		pr_info("PCI host bridge to bus %s\n", name);
-
-	if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE)
-		dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n");
+		pr_info("PCI host bridge to bus %s%s\n", name, numa);
 
 	/* Check if the boot configuration by FW needs to be preserved */
 	bridge->preserve_config = pci_preserve_config(bridge);
-- 
2.51.0


             reply	other threads:[~2026-03-05  0:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05  0:21 Bjorn Helgaas [this message]
2026-03-05  1:29 ` Yunsheng Lin

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=20260305002128.51147-1-bhelgaas@google.com \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linyunsheng@huawei.com \
    --cc=pmenzel@molgen.mpg.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®