ima: free duplicate measurement memory
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / pci-ats.h
blob655824fa4c76aab29aaf00b21c6ed522cbaaf288
1 #ifndef LINUX_PCI_ATS_H
2 #define LINUX_PCI_ATS_H
4 /* Address Translation Service */
5 struct pci_ats {
6 int pos; /* capability position */
7 int stu; /* Smallest Translation Unit */
8 int qdep; /* Invalidate Queue Depth */
9 int ref_cnt; /* Physical Function reference count */
10 unsigned int is_enabled:1; /* Enable bit is set */
13 #ifdef CONFIG_PCI_IOV
15 extern int pci_enable_ats(struct pci_dev *dev, int ps);
16 extern void pci_disable_ats(struct pci_dev *dev);
17 extern int pci_ats_queue_depth(struct pci_dev *dev);
18 /**
19 * pci_ats_enabled - query the ATS status
20 * @dev: the PCI device
22 * Returns 1 if ATS capability is enabled, or 0 if not.
24 static inline int pci_ats_enabled(struct pci_dev *dev)
26 return dev->ats && dev->ats->is_enabled;
29 #else /* CONFIG_PCI_IOV */
31 static inline int pci_enable_ats(struct pci_dev *dev, int ps)
33 return -ENODEV;
36 static inline void pci_disable_ats(struct pci_dev *dev)
40 static inline int pci_ats_queue_depth(struct pci_dev *dev)
42 return -ENODEV;
45 static inline int pci_ats_enabled(struct pci_dev *dev)
47 return 0;
50 #endif /* CONFIG_PCI_IOV */
52 #endif /* LINUX_PCI_ATS_H*/