#include <linux/pci.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/wait.h>
#include "pci.h"
DEFINE_RAW_SPINLOCK(…);
#define PCI_byte_BAD …
#define PCI_word_BAD …
#define PCI_dword_BAD …
#ifdef CONFIG_PCI_LOCKLESS_CONFIG
#define pci_lock_config(f) …
#define pci_unlock_config(f) …
#else
#define pci_lock_config …
#define pci_unlock_config …
#endif
#define PCI_OP_READ(size, type, len) …
#define PCI_OP_WRITE(size, type, len) …
PCI_OP_READ(…)
PCI_OP_READ(…)
PCI_OP_READ(…)
PCI_OP_WRITE(…)
PCI_OP_WRITE(…)
PCI_OP_WRITE(…)
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 *val)
{ … }
EXPORT_SYMBOL_GPL(…);
int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 val)
{ … }
EXPORT_SYMBOL_GPL(…);
int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 *val)
{ … }
EXPORT_SYMBOL_GPL(…);
int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 val)
{ … }
EXPORT_SYMBOL_GPL(…);
struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops)
{ … }
EXPORT_SYMBOL(…);
static DECLARE_WAIT_QUEUE_HEAD(pci_cfg_wait);
static noinline void pci_wait_cfg(struct pci_dev *dev)
__must_hold(&pci_lock)
{ … }
#define PCI_USER_READ_CONFIG(size, type) …
#define PCI_USER_WRITE_CONFIG(size, type) …
PCI_USER_READ_CONFIG(…)
PCI_USER_READ_CONFIG(…)
PCI_USER_READ_CONFIG(…)
PCI_USER_WRITE_CONFIG(…)
PCI_USER_WRITE_CONFIG(…)
PCI_USER_WRITE_CONFIG(…)
void pci_cfg_access_lock(struct pci_dev *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
bool pci_cfg_access_trylock(struct pci_dev *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void pci_cfg_access_unlock(struct pci_dev *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline int pcie_cap_version(const struct pci_dev *dev)
{ … }
bool pcie_cap_has_lnkctl(const struct pci_dev *dev)
{ … }
bool pcie_cap_has_lnkctl2(const struct pci_dev *dev)
{ … }
static inline bool pcie_cap_has_sltctl(const struct pci_dev *dev)
{ … }
bool pcie_cap_has_rtctl(const struct pci_dev *dev)
{ … }
static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos)
{ … }
int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val)
{ … }
EXPORT_SYMBOL(…);
int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val)
{ … }
EXPORT_SYMBOL(…);
int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val)
{ … }
EXPORT_SYMBOL(…);
int pcie_capability_write_dword(struct pci_dev *dev, int pos, u32 val)
{ … }
EXPORT_SYMBOL(…);
int pcie_capability_clear_and_set_word_unlocked(struct pci_dev *dev, int pos,
u16 clear, u16 set)
{ … }
EXPORT_SYMBOL(…);
int pcie_capability_clear_and_set_word_locked(struct pci_dev *dev, int pos,
u16 clear, u16 set)
{ … }
EXPORT_SYMBOL(…);
int pcie_capability_clear_and_set_dword(struct pci_dev *dev, int pos,
u32 clear, u32 set)
{ … }
EXPORT_SYMBOL(…);
int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val)
{ … }
EXPORT_SYMBOL(…);
int pci_read_config_word(const struct pci_dev *dev, int where, u16 *val)
{ … }
EXPORT_SYMBOL(…);
int pci_read_config_dword(const struct pci_dev *dev, int where,
u32 *val)
{ … }
EXPORT_SYMBOL(…);
int pci_write_config_byte(const struct pci_dev *dev, int where, u8 val)
{ … }
EXPORT_SYMBOL(…);
int pci_write_config_word(const struct pci_dev *dev, int where, u16 val)
{ … }
EXPORT_SYMBOL(…);
int pci_write_config_dword(const struct pci_dev *dev, int where,
u32 val)
{ … }
EXPORT_SYMBOL(…);
void pci_clear_and_set_config_dword(const struct pci_dev *dev, int pos,
u32 clear, u32 set)
{ … }
EXPORT_SYMBOL(…);