diff options
author | Tomasz Nowicki <tn@semihalf.com> | 2016-06-10 15:36:26 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-10 18:28:39 -0500 |
commit | 2ab51ddeca2fc32a7040d8560415be3366fa9ba7 (patch) | |
tree | 4db4d6e2af8dcdbce19338ae78f3ce84806fbd7c /drivers/pci/pci.c | |
parent | 1a4f93f7112fd92383534f4c23d7b24fd4f8833c (diff) | |
download | op-kernel-dev-2ab51ddeca2fc32a7040d8560415be3366fa9ba7.zip op-kernel-dev-2ab51ddeca2fc32a7040d8560415be3366fa9ba7.tar.gz |
ARM64: PCI: Add acpi_pci_bus_find_domain_nr()
Extend pci_bus_find_domain_nr() so it can find the domain from either:
- ACPI, via the new acpi_pci_bus_find_domain_nr() interface, or
- DT, via of_pci_bus_find_domain_nr()
Note that this is only used for CONFIG_PCI_DOMAINS_GENERIC=y, so it does
not affect x86 or ia64.
[bhelgaas: changelog]
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 97f7cd4..4834cee 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -7,6 +7,7 @@ * Copyright 1997 -- 2000 Martin Mares <mj@ucw.cz> */ +#include <linux/acpi.h> #include <linux/kernel.h> #include <linux/delay.h> #include <linux/init.h> @@ -4990,7 +4991,8 @@ static int of_pci_bus_find_domain_nr(struct device *parent) int pci_bus_find_domain_nr(struct pci_bus *bus, struct device *parent) { - return of_pci_bus_find_domain_nr(parent); + return acpi_disabled ? of_pci_bus_find_domain_nr(parent) : + acpi_pci_bus_find_domain_nr(bus); } #endif #endif |