diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2015-05-26 15:11:44 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-05-29 17:14:17 -0500 |
commit | 19bdb6e4ec071bc49a9871b41e6a59a1657ed365 (patch) | |
tree | d058b31e972d88e4ba3a340fbad5ca3dc0c14865 | |
parent | 247de694349c2eeea11b8d8936541f5012a09318 (diff) |
PCI: Move pci_ari_enabled() to global header
pci_ari_enabled() is useful outside of drivers/pci, particularly for
deriving INTx routing via ACPI _PRT, so move it to the global header.
Also convert to bool return.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Don Dutile <ddutile@redhat.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/pci/pci.h | 11 | ||||
-rw-r--r-- | include/linux/pci.h | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 9bd762c237ab..c1b2a433ca04 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -216,17 +216,6 @@ void __pci_bus_assign_resources(const struct pci_bus *bus, struct list_head *fail_head); bool pci_bus_clip_resource(struct pci_dev *dev, int idx); -/** - * pci_ari_enabled - query ARI forwarding status - * @bus: the PCI bus - * - * Returns 1 if ARI forwarding is enabled, or 0 if not enabled; - */ -static inline int pci_ari_enabled(struct pci_bus *bus) -{ - return bus->self && bus->self->ari_enabled; -} - void pci_reassigndev_resource_alignment(struct pci_dev *dev); void pci_disable_bridge_window(struct pci_dev *dev); diff --git a/include/linux/pci.h b/include/linux/pci.h index 353db8dc4c6e..2925561a8f1e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1905,4 +1905,15 @@ static inline bool pci_is_dev_assigned(struct pci_dev *pdev) { return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED; } + +/** + * pci_ari_enabled - query ARI forwarding status + * @bus: the PCI bus + * + * Returns true if ARI forwarding is enabled. + */ +static inline bool pci_ari_enabled(struct pci_bus *bus) +{ + return bus->self && bus->self->ari_enabled; +} #endif /* LINUX_PCI_H */ |