summaryrefslogtreecommitdiffstats
path: root/include/linux/pci-ats.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-09-27 15:57:16 +0200
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-10-14 09:05:35 -0700
commit086ac11f6435c9dc2fe5025fc8ea3a1dbca273d6 (patch)
tree29e9445f029b73bac174900cb68d5e1fd2748cef /include/linux/pci-ats.h
parentc320b976d7837c561ce4aa49dfe0a64f0e527ce4 (diff)
downloadop-kernel-dev-086ac11f6435c9dc2fe5025fc8ea3a1dbca273d6.zip
op-kernel-dev-086ac11f6435c9dc2fe5025fc8ea3a1dbca273d6.tar.gz
PCI: Add support for PASID capability
Devices supporting Process Address Space Identifiers (PASIDs) can use an IOMMU to access multiple IO address spaces at the same time. A PCIe device indicates support for this feature by implementing the PASID capability. This patch adds support for the capability to the Linux kernel. Reviewed-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci-ats.h')
-rw-r--r--include/linux/pci-ats.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h
index 0713952..e3d0b38 100644
--- a/include/linux/pci-ats.h
+++ b/include/linux/pci-ats.h
@@ -93,4 +93,35 @@ static inline int pci_pri_status(struct pci_dev *pdev)
}
#endif /* CONFIG_PCI_PRI */
+#ifdef CONFIG_PCI_PASID
+
+extern int pci_enable_pasid(struct pci_dev *pdev, int features);
+extern void pci_disable_pasid(struct pci_dev *pdev);
+extern int pci_pasid_features(struct pci_dev *pdev);
+extern int pci_max_pasids(struct pci_dev *pdev);
+
+#else /* CONFIG_PCI_PASID */
+
+static inline int pci_enable_pasid(struct pci_dev *pdev, int features)
+{
+ return -EINVAL;
+}
+
+static inline void pci_disable_pasid(struct pci_dev *pdev)
+{
+}
+
+static inline int pci_pasid_features(struct pci_dev *pdev)
+{
+ return -EINVAL;
+}
+
+static inline int pci_max_pasids(struct pci_dev *pdev)
+{
+ return -EINVAL;
+}
+
+#endif /* CONFIG_PCI_PASID */
+
+
#endif /* LINUX_PCI_ATS_H*/
OpenPOWER on IntegriCloud