summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/pci.c
diff options
context:
space:
mode:
authorGanapatrao Kulkarni <gkulkarni@caviumnetworks.com>2016-04-08 15:50:27 -0700
committerWill Deacon <will.deacon@arm.com>2016-04-15 18:06:09 +0100
commit1a2db300348b799479d2d22b84d51b27ad0458c7 (patch)
treec9e3329f00575143dae72e14725b9e48161e34d7 /arch/arm64/kernel/pci.c
parent3194ac6e66cc7a00c1fa9fecf33a7c376b489497 (diff)
downloadop-kernel-dev-1a2db300348b799479d2d22b84d51b27ad0458c7.zip
op-kernel-dev-1a2db300348b799479d2d22b84d51b27ad0458c7.tar.gz
arm64, numa: Add NUMA support for arm64 platforms.
Attempt to get the memory and CPU NUMA node via of_numa. If that fails, default the dummy NUMA node and map all memory and CPUs to node 0. Tested-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/pci.c')
-rw-r--r--arch/arm64/kernel/pci.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index c72de66..3c4e308 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -74,6 +74,16 @@ int raw_pci_write(unsigned int domain, unsigned int bus,
return -ENXIO;
}
+#ifdef CONFIG_NUMA
+
+int pcibus_to_node(struct pci_bus *bus)
+{
+ return dev_to_node(&bus->dev);
+}
+EXPORT_SYMBOL(pcibus_to_node);
+
+#endif
+
#ifdef CONFIG_ACPI
/* Root bridge scanning */
struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
OpenPOWER on IntegriCloud