Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631335 > unrolled thread

[RFC/RFT PATCH 2/3] PCI: Add call to set-up NUMA node for struct pci_bus devices

Started byLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
First post2017-04-26 12:10 +0200
Last post2017-04-26 12:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC/RFT PATCH 2/3] PCI: Add call to set-up NUMA node for struct pci_bus devices Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-04-26 12:10 +0200

#1631335 — [RFC/RFT PATCH 2/3] PCI: Add call to set-up NUMA node for struct pci_bus devices

FromLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Date2017-04-26 12:10 +0200
Subject[RFC/RFT PATCH 2/3] PCI: Add call to set-up NUMA node for struct pci_bus devices
Message-ID<tAs3v-Rc-1@gated-at.bofh.it>
The member dev in struct pci_bus represents the kernel struct
device representation of a PCI bus, inclusive of its NUMA node.
When a PCI host bridge is registered, initialize the corresponding
struct pci_bus.dev member NUMA node and add code in
pci_alloc_child_bus() to propagate the NUMA node set-up through the PCI
bus hierarchy (ie child nodes are in the same NUMA node as the parent).

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/probe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index dfc9a27..5739a993 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -770,6 +770,7 @@ int pci_register_host_bridge(struct pci_host_bridge *bridge)
 	device_enable_async_suspend(bus->bridge);
 	pci_set_bus_of_node(bus);
 	pci_set_bus_msi_domain(bus);
+	set_dev_node(&bus->dev, pci_bus_find_numa_node(bus));
 
 	if (!parent)
 		set_dev_node(bus->bridge, pcibus_to_node(bus));
@@ -861,7 +862,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
 	 */
 	child->dev.class = &pcibus_class;
 	dev_set_name(&child->dev, "%04x:%02x", pci_domain_nr(child), busnr);
-
+	set_dev_node(&child->dev, dev_to_node(&parent->dev));
 	/*
 	 * Set up the primary, secondary and subordinate
 	 * bus numbers.
-- 
2.10.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web