mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI: Remove warning about host bridge on unknown NUMA node
@ 2026-03-05  0:21 Bjorn Helgaas
  2026-03-05  1:29 ` Yunsheng Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2026-03-05  0:21 UTC (permalink / raw)
  To: linux-pci; +Cc: Paul Menzel, Yunsheng Lin, linux-kernel, Bjorn Helgaas

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: Remove warning about host bridge on unknown NUMA node
  2026-03-05  0:21 [PATCH] PCI: Remove warning about host bridge on unknown NUMA node Bjorn Helgaas
@ 2026-03-05  1:29 ` Yunsheng Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Yunsheng Lin @ 2026-03-05  1:29 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci; +Cc: Paul Menzel, linux-kernel, Bjorn Helgaas

On 2026/3/5 8:21, Bjorn Helgaas wrote:
> 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

LGTM.
Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>

> 
> 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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-05  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-05  0:21 [PATCH] PCI: Remove warning about host bridge on unknown NUMA node Bjorn Helgaas
2026-03-05  1:29 ` Yunsheng Lin

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®