diff options
| author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | 2019-04-17 14:24:40 -0400 |
|---|---|---|
| committer | Will Deacon <will.deacon@arm.com> | 2019-04-23 07:22:41 -0400 |
| commit | 6e1ffbb7c2ab80df54ecbb01cf3d2c64aafed74a (patch) | |
| tree | 12015eae489546b75a0c72ddc3cb69c82c08c658 | |
| parent | 954a03be033c7cef80ddc232e7cbdb17df735663 (diff) | |
PCI: Move ATS declarations outside of CONFIG_PCI
At the moment, the ATS functions are only defined when CONFIG_PCI is
enabled. Since we're about to use them in the Arm SMMUv3 driver, which
could be built with CONFIG_PCI disabled, and they are already guarded by
CONFIG_PCI_ATS which depends on CONFIG_PCI, move the definitions outside
of CONFIG_PCI.
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
| -rw-r--r-- | include/linux/pci.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 77448215ef5b..169c6a18d0b0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1521,21 +1521,6 @@ static inline void pcie_ecrc_get_policy(char *str) { } | |||
| 1521 | 1521 | ||
| 1522 | bool pci_ats_disabled(void); | 1522 | bool pci_ats_disabled(void); |
| 1523 | 1523 | ||
| 1524 | #ifdef CONFIG_PCI_ATS | ||
| 1525 | /* Address Translation Service */ | ||
| 1526 | void pci_ats_init(struct pci_dev *dev); | ||
| 1527 | int pci_enable_ats(struct pci_dev *dev, int ps); | ||
| 1528 | void pci_disable_ats(struct pci_dev *dev); | ||
| 1529 | int pci_ats_queue_depth(struct pci_dev *dev); | ||
| 1530 | int pci_ats_page_aligned(struct pci_dev *dev); | ||
| 1531 | #else | ||
| 1532 | static inline void pci_ats_init(struct pci_dev *d) { } | ||
| 1533 | static inline int pci_enable_ats(struct pci_dev *d, int ps) { return -ENODEV; } | ||
| 1534 | static inline void pci_disable_ats(struct pci_dev *d) { } | ||
| 1535 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } | ||
| 1536 | static inline int pci_ats_page_aligned(struct pci_dev *dev) { return 0; } | ||
| 1537 | #endif | ||
| 1538 | |||
| 1539 | #ifdef CONFIG_PCIE_PTM | 1524 | #ifdef CONFIG_PCIE_PTM |
| 1540 | int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); | 1525 | int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); |
| 1541 | #else | 1526 | #else |
| @@ -1730,6 +1715,21 @@ static inline const struct pci_device_id *pci_match_id(const struct pci_device_i | |||
| 1730 | { return NULL; } | 1715 | { return NULL; } |
| 1731 | #endif /* CONFIG_PCI */ | 1716 | #endif /* CONFIG_PCI */ |
| 1732 | 1717 | ||
| 1718 | #ifdef CONFIG_PCI_ATS | ||
| 1719 | /* Address Translation Service */ | ||
| 1720 | void pci_ats_init(struct pci_dev *dev); | ||
| 1721 | int pci_enable_ats(struct pci_dev *dev, int ps); | ||
| 1722 | void pci_disable_ats(struct pci_dev *dev); | ||
| 1723 | int pci_ats_queue_depth(struct pci_dev *dev); | ||
| 1724 | int pci_ats_page_aligned(struct pci_dev *dev); | ||
| 1725 | #else | ||
| 1726 | static inline void pci_ats_init(struct pci_dev *d) { } | ||
| 1727 | static inline int pci_enable_ats(struct pci_dev *d, int ps) { return -ENODEV; } | ||
| 1728 | static inline void pci_disable_ats(struct pci_dev *d) { } | ||
| 1729 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } | ||
| 1730 | static inline int pci_ats_page_aligned(struct pci_dev *dev) { return 0; } | ||
| 1731 | #endif | ||
| 1732 | |||
| 1733 | /* Include architecture-dependent settings and functions */ | 1733 | /* Include architecture-dependent settings and functions */ |
| 1734 | 1734 | ||
| 1735 | #include <asm/pci.h> | 1735 | #include <asm/pci.h> |
