Lines Matching +full:iommu +full:- +full:map +full:- +full:mask

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
15 #include <linux/dma-map-ops.h>
19 #include <asm/pci-bridge.h>
20 #include <asm/asm-const.h>
24 #define IOMMU_PAGE_MASK_4K (~((1 << IOMMU_PAGE_SHIFT_4K) - 1))
27 #define IOMMU_PAGE_SIZE(tblptr) (ASM_CONST(1) << (tblptr)->it_page_shift)
28 #define IOMMU_PAGE_MASK(tblptr) (~((1 << (tblptr)->it_page_shift) - 1))
38 * uaddr is a linear map address.
48 * returns old TCE and DMA direction mask.
93 unsigned long it_size; /* Size of iommu table in entries */
99 unsigned long it_index; /* which iommu table this is */
107 unsigned long it_page_shift;/* table iommu page size */
113 unsigned long it_reserved_start; /* Start of not-DMA-able (MMIO) area */
118 ((tbl)->it_ops->useraddrptr((tbl), (entry), false))
120 ((tbl)->it_ops->useraddrptr((tbl), (entry), true))
126 return __ilog2((size - 1) >> tbl->it_page_shift) + 1; in get_iommu_order()
137 dev->archdata.iommu_table_base = base; in set_iommu_table_base()
142 return dev->archdata.iommu_table_base; in get_iommu_table_base()
145 extern int dma_iommu_dma_supported(struct device *dev, u64 mask);
150 /* Initializes an iommu_table based in values set in the passed-in
190 /* IOMMU properties */
244 static inline int dma_iommu_dma_supported(struct device *dev, u64 mask) in dma_iommu_dma_supported() argument
253 unsigned long mask,
264 unsigned long mask, gfp_t flag, int node);
269 size_t size, unsigned long mask,
288 /* The API to support IOMMU operations for VFIO */
296 (iommu_tce_check_ioba((tbl)->it_page_shift, \
297 (tbl)->it_offset, (tbl)->it_size, \
300 (iommu_tce_check_ioba((tbl)->it_page_shift, \
301 (tbl)->it_offset, (tbl)->it_size, \
303 iommu_tce_check_gpa((tbl)->it_page_shift, (gpa)))