Skip to content

Commit fe59493

Browse files
geertubjorn-helgaas
authored andcommitted
PCI: Add dummy pci_acs_enabled() for CONFIG_PCI=n build
If CONFIG_PCI=n and gcc (e.g. 4.1.2) decides not to inline get_pci_function_alias_group(), the build fails with: drivers/iommu/iommu.o: In function `get_pci_function_alias_group': iommu.c:(.text+0xfdc): undefined reference to `pci_acs_enabled' Due to the various dummies for PCI calls in the CONFIG_PCI=n case, pci_acs_enabled() never called, but not all versions of gcc are smart enough to realize that. While explicitly marking get_pci_function_alias_group() inline would fix the build, this would inflate the code for the CONFIG_PCI=y case, as get_pci_function_alias_group() is a not-so-small function called from two places. Hence fix the issue by introducing a dummy for pci_acs_enabled() instead. Fixes: 0ae349a ("iommu/qcom: Add qcom_iommu") Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Alex Williamson <[email protected]>
1 parent 749aaf3 commit fe59493

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/pci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,8 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
16851685

16861686
#define dev_is_pci(d) (false)
16871687
#define dev_is_pf(d) (false)
1688+
static inline bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags)
1689+
{ return false; }
16881690
#endif /* CONFIG_PCI */
16891691

16901692
/* Include architecture-dependent settings and functions */

0 commit comments

Comments
 (0)