1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2014-2015 ARM Ltd.
8 #include <linux/iommu.h>
10 #ifdef CONFIG_IOMMU_DMA
12 int iommu_get_dma_cookie(struct iommu_domain *domain);
13 void iommu_put_dma_cookie(struct iommu_domain *domain);
15 int iommu_dma_init_fq(struct iommu_domain *domain);
17 void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list);
19 extern bool iommu_dma_forcedac;
20 static inline void iommu_dma_set_pci_32bit_workaround(struct device *dev)
22 dev->iommu->pci_32bit_workaround = !iommu_dma_forcedac;
25 #else /* CONFIG_IOMMU_DMA */
27 static inline int iommu_dma_init_fq(struct iommu_domain *domain)
32 static inline int iommu_get_dma_cookie(struct iommu_domain *domain)
37 static inline void iommu_put_dma_cookie(struct iommu_domain *domain)
41 static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list)
45 static inline void iommu_dma_set_pci_32bit_workaround(struct device *dev)
49 #endif /* CONFIG_IOMMU_DMA */
50 #endif /* __DMA_IOMMU_H */