aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-10-19 16:07:57 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-05-11 18:18:40 -0400
commitb48d4425b602f5f4978299474743dbea130d940d (patch)
tree7da23c264cab62bce753e60c4e8d5fbbb0aab0e7 /include/linux
parent69643e4829c5cd13bafe44a6b9f3eb2086e0f618 (diff)
PCI: add ID-based ordering enable/disable support
Add support to allow drivers to enable/disable ID-based ordering. Where supported, ID-based ordering can significantly improve the latency of individual requests by preventing them from queueing up behind unrelated traffic. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h13
-rw-r--r--include/linux/pci_regs.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 96f70d7e058d..551ddcb5f940 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -828,6 +828,11 @@ static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
828 return __pci_enable_wake(dev, state, false, enable); 828 return __pci_enable_wake(dev, state, false, enable);
829} 829}
830 830
831#define PCI_EXP_IDO_REQUEST (1<<0)
832#define PCI_EXP_IDO_COMPLETION (1<<1)
833void pci_enable_ido(struct pci_dev *dev, unsigned long type);
834void pci_disable_ido(struct pci_dev *dev, unsigned long type);
835
831/* For use by arch with custom probe code */ 836/* For use by arch with custom probe code */
832void set_pcie_port_type(struct pci_dev *pdev); 837void set_pcie_port_type(struct pci_dev *pdev);
833void set_pcie_hotplug_bridge(struct pci_dev *pdev); 838void set_pcie_hotplug_bridge(struct pci_dev *pdev);
@@ -1207,6 +1212,14 @@ static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
1207 return 0; 1212 return 0;
1208} 1213}
1209 1214
1215static inline void pci_enable_ido(struct pci_dev *dev, unsigned long type)
1216{
1217}
1218
1219static inline void pci_disable_ido(struct pci_dev *dev, unsigned long type)
1220{
1221}
1222
1210static inline int pci_request_regions(struct pci_dev *dev, const char *res_name) 1223static inline int pci_request_regions(struct pci_dev *dev, const char *res_name)
1211{ 1224{
1212 return -EIO; 1225 return -EIO;
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index be01380f798a..d9acf9b99814 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -510,6 +510,8 @@
510#define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ 510#define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */
511#define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ 511#define PCI_EXP_DEVCTL2 40 /* Device Control 2 */
512#define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ 512#define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */
513#define PCI_EXP_IDO_REQ_EN 0x100 /* ID-based ordering request enable */
514#define PCI_EXP_IDO_CMP_EN 0x200 /* ID-based ordering completion enable */
513#define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ 515#define PCI_EXP_LNKCTL2 48 /* Link Control 2 */
514#define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ 516#define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */
515 517