Lines Matching +full:prefetch +full:- +full:dma
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/prefetch.h>
5 * iommu_fill_pdir - Insert coalesced scatter/gather chunks into the I/O Pdir.
9 * @hint: The DMA Hint.
20 struct scatterlist *dma_sg = startsg; /* pointer to current DMA */ in iommu_fill_pdir()
28 dma_sg--; in iommu_fill_pdir()
30 while (nents-- > 0) { in iommu_fill_pdir()
36 sg_virt(startsg), startsg->length in iommu_fill_pdir()
41 ** Look for the start of a new DMA stream in iommu_fill_pdir()
57 sg_dma_address(dma_sg) = pide | ioc->ibase; in iommu_fill_pdir()
64 pdirp = &(ioc->pdir_base[pide >> IOVP_SHIFT]); in iommu_fill_pdir()
71 sg_dma_len(dma_sg) += startsg->length; in iommu_fill_pdir()
72 size = startsg->length + dma_offset; in iommu_fill_pdir()
75 ioc->msg_pages += startsg->length >> IOVP_SHIFT; in iommu_fill_pdir()
81 size -= IOVP_SIZE; in iommu_fill_pdir()
92 ** in the DMA stream. Allocates PDIR entries but does not fill them.
93 ** Returns the number of DMA chunks.
106 unsigned long dma_offset, dma_len; /* start/len of DMA stream */ in iommu_coalesce_chunks()
117 ** Prepare for first/next DMA stream in iommu_coalesce_chunks()
120 dma_len = startsg->length; in iommu_coalesce_chunks()
121 dma_offset = startsg->offset; in iommu_coalesce_chunks()
131 while(--nents > 0) { in iommu_coalesce_chunks()
135 startsg->length; in iommu_coalesce_chunks()
145 ** First make sure current dma stream won't in iommu_coalesce_chunks()
149 if (unlikely(ALIGN(dma_len + dma_offset + startsg->length, IOVP_SIZE) > in iommu_coalesce_chunks()
163 dma_len += startsg->length; in iommu_coalesce_chunks()
167 ** End of DMA Stream in iommu_coalesce_chunks()
169 ** Allocate space for DMA stream. in iommu_coalesce_chunks()