Loading...
Note: File does not exist in v5.9.
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2014-2015 ARM Ltd.
4 */
5#ifndef __DMA_IOMMU_H
6#define __DMA_IOMMU_H
7
8#include <linux/iommu.h>
9
10#ifdef CONFIG_IOMMU_DMA
11
12int iommu_get_dma_cookie(struct iommu_domain *domain);
13void iommu_put_dma_cookie(struct iommu_domain *domain);
14
15int iommu_dma_init_fq(struct iommu_domain *domain);
16
17void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list);
18
19extern bool iommu_dma_forcedac;
20
21#else /* CONFIG_IOMMU_DMA */
22
23static inline int iommu_dma_init_fq(struct iommu_domain *domain)
24{
25 return -EINVAL;
26}
27
28static inline int iommu_get_dma_cookie(struct iommu_domain *domain)
29{
30 return -ENODEV;
31}
32
33static inline void iommu_put_dma_cookie(struct iommu_domain *domain)
34{
35}
36
37static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list)
38{
39}
40
41#endif /* CONFIG_IOMMU_DMA */
42#endif /* __DMA_IOMMU_H */