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


Groups > linux.kernel > #1641670 > unrolled thread

[RFC/RFT PATCH v2 0/3] PCI: generic device NUMA node detection

Started byLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
First post2017-05-15 15:30 +0200
Last post2017-05-15 15:30 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [RFC/RFT PATCH v2 0/3] PCI: generic device NUMA node detection Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-05-15 15:30 +0200
    [RFC/RFT PATCH v2 1/3] PCI: Introduce pci_bus_find_numa_node() Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-05-15 15:30 +0200

#1641670 — [RFC/RFT PATCH v2 0/3] PCI: generic device NUMA node detection

FromLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Date2017-05-15 15:30 +0200
Subject[RFC/RFT PATCH v2 0/3] PCI: generic device NUMA node detection
Message-ID<tHoet-iQ-5@gated-at.bofh.it>
This patch series is v2 of a previous posting:

v1 -> v2:

- Added missing call to acpi_pci_bus_find_numa_node()
- Rebased against v4.12-rc1

v1: https://lkml.org/lkml/2017/4/26/211

On the ARM64 architecture, the arch specific PCI pcibus_to_node() callback
can be triggered on struct pci_bus.sysdata structures that carry host
bridge specific data through different structures layout (ie sysdata
pointer points at different structs for different host bridges), therefore
it is not possible to have a unified pcibus_to_node() implementation.

Given that the device NUMA node is a property of the struct pci_bus (and
its associated struct device), move the struct pci_bus node assignment to
generic PCI code, where according to the platform firmware the NUMA node
for the device backing the struct pci_bus is retrieved and propagated
through the PCI bus hierarchy.

Lorenzo Pieralisi (3):
  PCI: Introduce pci_bus_find_numa_node()
  PCI: Add call to set-up NUMA node for struct pci_bus devices
  PCI/ACPI: Add ACPI pci_bus_find_numa_node() implementation

 drivers/pci/pci-acpi.c | 20 ++++++++++++++++++++
 drivers/pci/pci.c      |  6 ++++++
 drivers/pci/probe.c    |  3 ++-
 include/linux/pci.h    |  7 +++++++
 4 files changed, 35 insertions(+), 1 deletion(-)

-- 
2.10.0

[toc] | [next] | [standalone]


#1641671 — [RFC/RFT PATCH v2 1/3] PCI: Introduce pci_bus_find_numa_node()

FromLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Date2017-05-15 15:30 +0200
Subject[RFC/RFT PATCH v2 1/3] PCI: Introduce pci_bus_find_numa_node()
Message-ID<tHoeu-iQ-21@gated-at.bofh.it>
In reply to#1641670
Create an empty stub, to be populated by firmware methods, to
retrieve the NUMA node for a given pci_bus. No functional change
introduced.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/pci.c   | 6 ++++++
 include/linux/pci.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b01bd5b..e9803c1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/dmi.h>
 #include <linux/init.h>
+#include <linux/numa.h>
 #include <linux/of.h>
 #include <linux/of_pci.h>
 #include <linux/pci.h>
@@ -5403,6 +5404,11 @@ int pci_bus_find_domain_nr(struct pci_bus *bus, struct device *parent)
 #endif
 #endif
 
+int pci_bus_find_numa_node(struct pci_bus *bus)
+{
+	return NUMA_NO_NODE;
+}
+
 /**
  * pci_ext_cfg_avail - can we access extended PCI config space?
  *
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 33c2b0b..ccbeefd 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1472,6 +1472,7 @@ static inline int acpi_pci_bus_find_domain_nr(struct pci_bus *bus)
 #endif
 int pci_bus_find_domain_nr(struct pci_bus *bus, struct device *parent);
 #endif
+int pci_bus_find_numa_node(struct pci_bus *bus);
 
 /* some architectures require additional setup to direct VGA traffic */
 typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode,
-- 
2.10.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web