summaryrefslogtreecommitdiffstats
path: root/sys/arm64
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-05-20 08:29:00 +0000
committerandrew <andrew@FreeBSD.org>2016-05-20 08:29:00 +0000
commit353b498d9da0b9258b169da73a007a346c8830af (patch)
tree795424418b55017ef74dbaad7dc2aff805ef57cb /sys/arm64
parente97aca5af06aac15eaa50baf4f2cb9a8695095d8 (diff)
downloadFreeBSD-src-353b498d9da0b9258b169da73a007a346c8830af.zip
FreeBSD-src-353b498d9da0b9258b169da73a007a346c8830af.tar.gz
Handle PCI_RES_BUS on the generic and ThunderX PCIe drivers. This has been
tested on the Pass 1.1 and 2.0 ThunderX machines in the Netperf cluster. Reviewed by: jhb Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6453
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/cavium/thunder_pcie_pem.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c
index 7b4394f..a8f2f43 100644
--- a/sys/arm64/cavium/thunder_pcie_pem.c
+++ b/sys/arm64/cavium/thunder_pcie_pem.c
@@ -313,6 +313,10 @@ thunder_pem_adjust_resource(device_t dev, device_t child, int type,
struct rman *rm;
sc = device_get_softc(dev);
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ if (type == PCI_RES_BUS)
+ return (pci_domain_adjust_bus(sc->id, child, res, start, end));
+#endif
rm = thunder_pem_rman(sc, type);
if (rm == NULL)
@@ -619,6 +623,11 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid,
struct resource *res;
device_t parent_dev;
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ if (type == PCI_RES_BUS)
+ return (pci_domain_alloc_bus(sc->id, child, rid, start, end,
+ count, flags));
+#endif
rm = thunder_pem_rman(sc, type);
if (rm == NULL) {
/* Find parent device. On ThunderX we know an exact path. */
@@ -675,7 +684,12 @@ thunder_pem_release_resource(device_t dev, device_t child, int type, int rid,
struct resource *res)
{
device_t parent_dev;
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ struct thunder_pem_softc *sc = device_get_softc(dev);
+ if (type == PCI_RES_BUS)
+ return (pci_domain_release_bus(sc->id, child, rid, res));
+#endif
/* Find parent device. On ThunderX we know an exact path. */
parent_dev = device_get_parent(device_get_parent(dev));
OpenPOWER on IntegriCloud