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))
31 #define DIRECT64_PROPNAME "linux,direct64-ddr-window-info"
32 #define DMA64_PROPNAME "linux,dma64-ddr-window-info"
43 * uaddr is a linear map address.
53 * returns old TCE and DMA direction mask.
98 unsigned long it_size; /* Size of iommu table in entries */
104 unsigned long it_index; /* which iommu table this is */
112 unsigned long it_page_shift;/* table iommu page size */
118 unsigned long it_reserved_start; /* Start of not-DMA-able (MMIO) area */
123 ((tbl)->it_ops->useraddrptr((tbl), (entry), false))
125 ((tbl)->it_ops->useraddrptr((tbl), (entry), true))
131 return __ilog2((size - 1) >> tbl->it_page_shift) + 1; in get_iommu_order()
142 dev->archdata.iommu_table_base = base; in set_iommu_table_base()
147 return dev->archdata.iommu_table_base; in get_iommu_table_base()
150 extern int dma_iommu_dma_supported(struct device *dev, u64 mask);
155 /* Initializes an iommu_table based in values set in the passed-in
198 /* IOMMU properties */
254 static inline int dma_iommu_dma_supported(struct device *dev, u64 mask) in dma_iommu_dma_supported() argument
263 unsigned long mask,
274 unsigned long mask, gfp_t flag, int node);
279 size_t size, unsigned long mask,
298 /* The API to support IOMMU operations for VFIO */
306 (iommu_tce_check_ioba((tbl)->it_page_shift, \
307 (tbl)->it_offset, (tbl)->it_size, \
310 (iommu_tce_check_ioba((tbl)->it_page_shift, \
311 (tbl)->it_offset, (tbl)->it_size, \
313 iommu_tce_check_gpa((tbl)->it_page_shift, (gpa)))