Skip to content

Commit 19bdb6e

Browse files
awilliambjorn-helgaas
authored andcommitted
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 <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Don Dutile <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]>
1 parent 247de69 commit 19bdb6e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

drivers/pci/pci.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,6 @@ void __pci_bus_assign_resources(const struct pci_bus *bus,
216216
struct list_head *fail_head);
217217
bool pci_bus_clip_resource(struct pci_dev *dev, int idx);
218218

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-
230219
void pci_reassigndev_resource_alignment(struct pci_dev *dev);
231220
void pci_disable_bridge_window(struct pci_dev *dev);
232221

include/linux/pci.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,4 +1905,15 @@ static inline bool pci_is_dev_assigned(struct pci_dev *pdev)
19051905
{
19061906
return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED;
19071907
}
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+
}
19081919
#endif /* LINUX_PCI_H */

0 commit comments

Comments
 (0)