~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/pci-ats.h

Version: ~ [ linux-5.9-rc5 ] ~ [ linux-5.8.10 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.66 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.146 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.198 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.236 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.236 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef LINUX_PCI_ATS_H
  2 #define LINUX_PCI_ATS_H
  3 
  4 #include <linux/pci.h>
  5 
  6 /* Address Translation Service */
  7 struct pci_ats {
  8         int pos;        /* capability position */
  9         int stu;        /* Smallest Translation Unit */
 10         int qdep;       /* Invalidate Queue Depth */
 11         int ref_cnt;    /* Physical Function reference count */
 12         unsigned int is_enabled:1;      /* Enable bit is set */
 13 };
 14 
 15 #ifdef CONFIG_PCI_ATS
 16 
 17 int pci_enable_ats(struct pci_dev *dev, int ps);
 18 void pci_disable_ats(struct pci_dev *dev);
 19 int pci_ats_queue_depth(struct pci_dev *dev);
 20 
 21 /**
 22  * pci_ats_enabled - query the ATS status
 23  * @dev: the PCI device
 24  *
 25  * Returns 1 if ATS capability is enabled, or 0 if not.
 26  */
 27 static inline int pci_ats_enabled(struct pci_dev *dev)
 28 {
 29         return dev->ats && dev->ats->is_enabled;
 30 }
 31 
 32 #else /* CONFIG_PCI_ATS */
 33 
 34 static inline int pci_enable_ats(struct pci_dev *dev, int ps)
 35 {
 36         return -ENODEV;
 37 }
 38 
 39 static inline void pci_disable_ats(struct pci_dev *dev)
 40 {
 41 }
 42 
 43 static inline int pci_ats_queue_depth(struct pci_dev *dev)
 44 {
 45         return -ENODEV;
 46 }
 47 
 48 static inline int pci_ats_enabled(struct pci_dev *dev)
 49 {
 50         return 0;
 51 }
 52 
 53 #endif /* CONFIG_PCI_ATS */
 54 
 55 #ifdef CONFIG_PCI_PRI
 56 
 57 int pci_enable_pri(struct pci_dev *pdev, u32 reqs);
 58 void pci_disable_pri(struct pci_dev *pdev);
 59 int pci_reset_pri(struct pci_dev *pdev);
 60 
 61 #else /* CONFIG_PCI_PRI */
 62 
 63 static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs)
 64 {
 65         return -ENODEV;
 66 }
 67 
 68 static inline void pci_disable_pri(struct pci_dev *pdev)
 69 {
 70 }
 71 
 72 static inline int pci_reset_pri(struct pci_dev *pdev)
 73 {
 74         return -ENODEV;
 75 }
 76 
 77 #endif /* CONFIG_PCI_PRI */
 78 
 79 #ifdef CONFIG_PCI_PASID
 80 
 81 int pci_enable_pasid(struct pci_dev *pdev, int features);
 82 void pci_disable_pasid(struct pci_dev *pdev);
 83 int pci_pasid_features(struct pci_dev *pdev);
 84 int pci_max_pasids(struct pci_dev *pdev);
 85 
 86 #else  /* CONFIG_PCI_PASID */
 87 
 88 static inline int pci_enable_pasid(struct pci_dev *pdev, int features)
 89 {
 90         return -EINVAL;
 91 }
 92 
 93 static inline void pci_disable_pasid(struct pci_dev *pdev)
 94 {
 95 }
 96 
 97 static inline int pci_pasid_features(struct pci_dev *pdev)
 98 {
 99         return -EINVAL;
100 }
101 
102 static inline int pci_max_pasids(struct pci_dev *pdev)
103 {
104         return -EINVAL;
105 }
106 
107 #endif /* CONFIG_PCI_PASID */
108 
109 
110 #endif /* LINUX_PCI_ATS_H*/
111 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp