aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r--drivers/pci/pci.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index d807cd786f20..9de87e9f98f5 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -1,3 +1,9 @@
1#ifndef DRIVERS_PCI_H
2#define DRIVERS_PCI_H
3
4#define PCI_CFG_SPACE_SIZE 256
5#define PCI_CFG_SPACE_EXP_SIZE 4096
6
1/* Functions internal to the PCI core code */ 7/* Functions internal to the PCI core code */
2 8
3extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env); 9extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env);
@@ -76,7 +82,13 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }
76/* Functions for PCI Hotplug drivers to use */ 82/* Functions for PCI Hotplug drivers to use */
77extern unsigned int pci_do_scan_bus(struct pci_bus *bus); 83extern unsigned int pci_do_scan_bus(struct pci_bus *bus);
78 84
85#ifdef HAVE_PCI_LEGACY
86extern void pci_create_legacy_files(struct pci_bus *bus);
79extern void pci_remove_legacy_files(struct pci_bus *bus); 87extern void pci_remove_legacy_files(struct pci_bus *bus);
88#else
89static inline void pci_create_legacy_files(struct pci_bus *bus) { return; }
90static inline void pci_remove_legacy_files(struct pci_bus *bus) { return; }
91#endif
80 92
81/* Lock for read/write access to pci device and bus lists */ 93/* Lock for read/write access to pci device and bus lists */
82extern struct rw_semaphore pci_bus_sem; 94extern struct rw_semaphore pci_bus_sem;
@@ -86,9 +98,11 @@ extern unsigned int pci_pm_d3_delay;
86#ifdef CONFIG_PCI_MSI 98#ifdef CONFIG_PCI_MSI
87void pci_no_msi(void); 99void pci_no_msi(void);
88extern void pci_msi_init_pci_dev(struct pci_dev *dev); 100extern void pci_msi_init_pci_dev(struct pci_dev *dev);
101extern void __devinit msi_init(void);
89#else 102#else
90static inline void pci_no_msi(void) { } 103static inline void pci_no_msi(void) { }
91static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { } 104static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
105static inline void msi_init(void) { }
92#endif 106#endif
93 107
94#ifdef CONFIG_PCIEAER 108#ifdef CONFIG_PCIEAER
@@ -109,6 +123,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
109extern int pcie_mch_quirk; 123extern int pcie_mch_quirk;
110extern struct device_attribute pci_dev_attrs[]; 124extern struct device_attribute pci_dev_attrs[];
111extern struct device_attribute dev_attr_cpuaffinity; 125extern struct device_attribute dev_attr_cpuaffinity;
126extern struct device_attribute dev_attr_cpulistaffinity;
112 127
113/** 128/**
114 * pci_match_one_device - Tell if a PCI device structure has a matching 129 * pci_match_one_device - Tell if a PCI device structure has a matching
@@ -144,3 +159,16 @@ struct pci_slot_attribute {
144}; 159};
145#define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) 160#define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr)
146 161
162extern void pci_enable_ari(struct pci_dev *dev);
163/**
164 * pci_ari_enabled - query ARI forwarding status
165 * @dev: the PCI device
166 *
167 * Returns 1 if ARI forwarding is enabled, or 0 if not enabled;
168 */
169static inline int pci_ari_enabled(struct pci_dev *dev)
170{
171 return dev->ari_enabled;
172}
173
174#endif /* DRIVERS_PCI_H */