summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci-ats.h2
-rw-r--r--include/linux/pci.h9
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h
index 72031785fe1d..e2dcc2ff3d0e 100644
--- a/include/linux/pci-ats.h
+++ b/include/linux/pci-ats.h
@@ -8,7 +8,7 @@ struct pci_ats {
int pos; /* capability position */
int stu; /* Smallest Translation Unit */
int qdep; /* Invalidate Queue Depth */
- int ref_cnt; /* Physical Function reference count */
+ atomic_t ref_cnt; /* number of VFs with ATS enabled */
unsigned int is_enabled:1; /* Enable bit is set */
};
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 8a0321a8fb59..1817819ba57b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1294,6 +1294,15 @@ int ht_create_irq(struct pci_dev *dev, int idx);
void ht_destroy_irq(unsigned int irq);
#endif /* CONFIG_HT_IRQ */
+#ifdef CONFIG_PCI_ATS
+/* Address Translation Service */
+void pci_ats_init(struct pci_dev *dev);
+void pci_ats_free(struct pci_dev *dev);
+#else
+static inline void pci_ats_init(struct pci_dev *dev) { }
+static inline void pci_ats_free(struct pci_dev *dev) { }
+#endif
+
void pci_cfg_access_lock(struct pci_dev *dev);
bool pci_cfg_access_trylock(struct pci_dev *dev);
void pci_cfg_access_unlock(struct pci_dev *dev);