[PATCH] PCI: Remove warning about host bridge on unknown NUMA node
From: Bjorn Helgaas
Date: Wed Mar 04 2026 - 19:21:42 EST
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@xxxxxxxxxxxxx>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218951
Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
---
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