diff options
author | Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> | 2019-09-05 14:31:45 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-10-15 16:39:09 -0500 |
commit | c065190bbcd4fb54ce9c5fd34fcad71acf2a0ea4 (patch) | |
tree | 028ddd64500970c58eebf7a51f1d25b4014f7183 /drivers/pci/pci.h | |
parent | 3ad62192097443e8c3a8e244475bacaecb894d4e (diff) | |
download | linux-c065190bbcd4fb54ce9c5fd34fcad71acf2a0ea4.tar.gz linux-c065190bbcd4fb54ce9c5fd34fcad71acf2a0ea4.tar.bz2 linux-c065190bbcd4fb54ce9c5fd34fcad71acf2a0ea4.zip |
PCI/ATS: Cache PRI Capability offset
Previously each PRI interface searched for the PRI Capability. Cache the
capability offset the first time we use it instead of searching each time.
[bhelgaas: commit log, reorder patch to later, call pci_pri_init() from
pci_init_capabilities()]
Link: https://lore.kernel.org/r/0c5495d376faf6dbb8eb2165204c474438aaae65.156
7029860.git.sathyanarayanan.kuppuswamy@linux.intel.com
Link: https://lore.kernel.org/r/20190905193146.90250-5-helgaas@kernel.org
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 3f6947ee3324..aa08cd35bf87 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -456,6 +456,12 @@ static inline void pci_ats_init(struct pci_dev *d) { } static inline void pci_restore_ats_state(struct pci_dev *dev) { } #endif /* CONFIG_PCI_ATS */ +#ifdef CONFIG_PCI_PRI +void pci_pri_init(struct pci_dev *dev); +#else +static inline void pci_pri_init(struct pci_dev *dev) { } +#endif + #ifdef CONFIG_PCI_IOV int pci_iov_init(struct pci_dev *dev); void pci_iov_release(struct pci_dev *dev); |