diff options
| author | Alex Williamson <alex.williamson@redhat.com> | 2015-05-26 17:11:44 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-05-29 18:14:17 -0400 |
| 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, | |||
| 216 | struct list_head *fail_head); | 216 | struct list_head *fail_head); |
| 217 | bool pci_bus_clip_resource(struct pci_dev *dev, int idx); | 217 | bool pci_bus_clip_resource(struct pci_dev *dev, int idx); |
| 218 | 218 | ||
| 219 | /** | ||
| 220 | * pci_ari_enabled - query ARI forwarding status | ||
| 221 | * @bus: the PCI bus | ||
| 222 | * | ||
| 223 | * Returns 1 if ARI forwarding is enabled, or 0 if not enabled; | ||
| 224 | */ | ||
| 225 | static inline int pci_ari_enabled(struct pci_bus *bus) | ||
| 226 | { | ||
| 227 | return bus->self && bus->self->ari_enabled; | ||
| 228 | } | ||
| 229 | |||
| 230 | void pci_reassigndev_resource_alignment(struct pci_dev *dev); | 219 | void pci_reassigndev_resource_alignment(struct pci_dev *dev); |
| 231 | void pci_disable_bridge_window(struct pci_dev *dev); | 220 | void pci_disable_bridge_window(struct pci_dev *dev); |
| 232 | 221 | ||
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) | |||
| 1905 | { | 1905 | { |
| 1906 | return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED; | 1906 | return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED; |
| 1907 | } | 1907 | } |
| 1908 | |||
| 1909 | /** | ||
| 1910 | * pci_ari_enabled - query ARI forwarding status | ||
| 1911 | * @bus: the PCI bus | ||
| 1912 | * | ||
| 1913 | * Returns true if ARI forwarding is enabled. | ||
| 1914 | */ | ||
| 1915 | static inline bool pci_ari_enabled(struct pci_bus *bus) | ||
| 1916 | { | ||
| 1917 | return bus->self && bus->self->ari_enabled; | ||
| 1918 | } | ||
| 1908 | #endif /* LINUX_PCI_H */ | 1919 | #endif /* LINUX_PCI_H */ |
