| /linux/drivers/parisc/ |
| A D | iommu-helpers.h | 47 BUG_ON(pdirp && (dma_len != sg_dma_len(dma_sg))); in iommu_fill_pdir() 51 dma_len = sg_dma_len(startsg); in iommu_fill_pdir() 52 sg_dma_len(startsg) = 0; in iommu_fill_pdir() 71 sg_dma_len(dma_sg) += startsg->length; in iommu_fill_pdir() 125 sg_dma_len(startsg) = 0; in iommu_coalesce_chunks() 142 sg_dma_len(startsg) = 0; in iommu_coalesce_chunks() 171 sg_dma_len(contig_sg) = dma_len; in iommu_coalesce_chunks()
|
| /linux/drivers/media/pci/tw68/ |
| A D | tw68-risc.c | 57 while (offset && offset >= sg_dma_len(sg)) { in tw68_risc_field() 58 offset -= sg_dma_len(sg); in tw68_risc_field() 61 if (bpl <= sg_dma_len(sg) - offset) { in tw68_risc_field() 76 done = (sg_dma_len(sg) - offset); in tw68_risc_field() 84 while (todo > sg_dma_len(sg)) { in tw68_risc_field() 87 sg_dma_len(sg)); in tw68_risc_field() 89 todo -= sg_dma_len(sg); in tw68_risc_field() 91 done += sg_dma_len(sg); in tw68_risc_field()
|
| /linux/drivers/infiniband/core/ |
| A D | umem_dmabuf.c | 43 if (start < cur + sg_dma_len(sg) && cur < end) in ib_umem_dmabuf_map_pages() 45 if (cur <= start && start < cur + sg_dma_len(sg)) { in ib_umem_dmabuf_map_pages() 51 sg_dma_len(sg) -= offset; in ib_umem_dmabuf_map_pages() 54 if (cur < end && end <= cur + sg_dma_len(sg)) { in ib_umem_dmabuf_map_pages() 55 unsigned long trim = cur + sg_dma_len(sg) - end; in ib_umem_dmabuf_map_pages() 59 sg_dma_len(sg) -= trim; in ib_umem_dmabuf_map_pages() 62 cur += sg_dma_len(sg); in ib_umem_dmabuf_map_pages() 97 sg_dma_len(umem_dmabuf->first_sg) += in ib_umem_dmabuf_unmap_pages() 103 sg_dma_len(umem_dmabuf->last_sg) += in ib_umem_dmabuf_unmap_pages()
|
| /linux/drivers/gpu/drm/i915/ |
| A D | i915_scatterlist.h | 34 if (dma && s.sgp && sg_dma_len(s.sgp) == 0) { in __sgt_iter() 40 s.max += sg_dma_len(s.sgp); in __sgt_iter() 57 return sg_dma_len(sg) >> PAGE_SHIFT; in __sg_dma_page_count() 131 while (sg && sg_dma_len(sg)) { in i915_sg_dma_sizes() 133 GEM_BUG_ON(!IS_ALIGNED(sg_dma_len(sg), PAGE_SIZE)); in i915_sg_dma_sizes() 134 page_sizes |= sg_dma_len(sg); in i915_sg_dma_sizes()
|
| A D | i915_scatterlist.c | 31 sg_dma_len(new_sg) = sg_dma_len(sg); in i915_sg_trim() 128 sg_dma_len(sg) = 0; in i915_rsgt_from_mm_node() 135 sg_dma_len(sg) += len; in i915_rsgt_from_mm_node() 218 sg_dma_len(sg) = 0; in i915_rsgt_from_buddy_resource() 225 sg_dma_len(sg) += len; in i915_rsgt_from_buddy_resource()
|
| A D | i915_mm.c | 146 while (offset >= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT) { in remap_io_sg() 147 offset -= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT; in remap_io_sg()
|
| /linux/net/rds/ |
| A D | ib_frmr.c | 134 ret = ib_map_mr_sg_zbva(frmr->mr, ibmr->sg, ibmr->sg_dma_len, in rds_ib_post_reg_frmr() 136 if (unlikely(ret != ibmr->sg_dma_len)) in rds_ib_post_reg_frmr() 205 ibmr->sg_dma_len = 0; in rds_ib_map_frmr() 207 WARN_ON(ibmr->sg_dma_len); in rds_ib_map_frmr() 208 ibmr->sg_dma_len = ib_dma_map_sg(dev, ibmr->sg, ibmr->sg_len, in rds_ib_map_frmr() 210 if (unlikely(!ibmr->sg_dma_len)) { in rds_ib_map_frmr() 220 for (i = 0; i < ibmr->sg_dma_len; ++i) { in rds_ib_map_frmr() 221 unsigned int dma_len = sg_dma_len(&ibmr->sg[i]); in rds_ib_map_frmr() 233 if (i < ibmr->sg_dma_len - 1) in rds_ib_map_frmr() 262 ibmr->sg_dma_len = 0; in rds_ib_map_frmr() [all …]
|
| A D | ib.h | 327 unsigned int sg_dma_len, in rds_ib_dma_sync_sg_for_cpu() argument 333 for_each_sg(sglist, sg, sg_dma_len, i) { in rds_ib_dma_sync_sg_for_cpu() 335 sg_dma_len(sg), direction); in rds_ib_dma_sync_sg_for_cpu() 342 unsigned int sg_dma_len, in rds_ib_dma_sync_sg_for_device() argument 348 for_each_sg(sglist, sg, sg_dma_len, i) { in rds_ib_dma_sync_sg_for_device() 350 sg_dma_len(sg), direction); in rds_ib_dma_sync_sg_for_device()
|
| /linux/lib/ |
| A D | sg_split.c | 36 sglen = mapped ? sg_dma_len(sg) : sg->length; in sg_calculate_split() 95 sg_dma_len(out_sg) = 0; in sg_split_phys() 114 sg_dma_len(out_sg) = sg_dma_len(in_sg); in sg_split_mapped() 117 sg_dma_len(out_sg) -= split->skip_sg0; in sg_split_mapped() 121 sg_dma_len(--out_sg) = split->length_last_sg; in sg_split_mapped()
|
| /linux/drivers/media/pci/bt8xx/ |
| A D | bttv-risc.c | 74 offset -= sg_dma_len(sg); in bttv_risc_packed() 77 if (bpl <= sg_dma_len(sg)-offset) { in bttv_risc_packed() 87 (sg_dma_len(sg)-offset)); in bttv_risc_packed() 89 todo -= (sg_dma_len(sg)-offset); in bttv_risc_packed() 92 while (todo > sg_dma_len(sg)) { in bttv_risc_packed() 94 sg_dma_len(sg)); in bttv_risc_packed() 96 todo -= sg_dma_len(sg); in bttv_risc_packed() 177 yoffset -= sg_dma_len(ysg); in bttv_risc_planar() 184 ylen = sg_dma_len(ysg) - yoffset; in bttv_risc_planar() 187 uoffset -= sg_dma_len(usg); in bttv_risc_planar() [all …]
|
| /linux/drivers/scsi/qla2xxx/ |
| A D | qla_dsd.h | 15 put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length); in append_dsd32() 28 put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length); in append_dsd64()
|
| /linux/drivers/media/pci/cx25821/ |
| A D | cx25821-core.c | 1010 offset -= sg_dma_len(sg); in cx25821_risc_field() 1024 (sg_dma_len(sg) - offset)); in cx25821_risc_field() 1027 todo -= (sg_dma_len(sg) - offset); in cx25821_risc_field() 1030 while (todo > sg_dma_len(sg)) { in cx25821_risc_field() 1032 sg_dma_len(sg)); in cx25821_risc_field() 1035 todo -= sg_dma_len(sg); in cx25821_risc_field() 1115 offset -= sg_dma_len(sg); in cx25821_risc_field_audio() 1135 (sg_dma_len(sg) - offset)); in cx25821_risc_field_audio() 1141 while (todo > sg_dma_len(sg)) { in cx25821_risc_field_audio() 1143 sg_dma_len(sg)); in cx25821_risc_field_audio() [all …]
|
| /linux/drivers/gpu/drm/i915/gt/ |
| A D | intel_migrate.c | 460 if (!it->sg || sg_dma_len(it->sg) == 0) in emit_pte() 464 it->max = it->dma + sg_dma_len(it->sg); in emit_pte() 632 while (sg && sg_dma_len(sg)) { in scatter_list_length() 633 len += sg_dma_len(sg); in scatter_list_length() 662 GEM_BUG_ON(!it->sg || !sg_dma_len(it->sg)); in get_ccs_sg_sgt() 673 it->max = it->dma + sg_dma_len(it->sg); in get_ccs_sg_sgt() 896 WARN_ON(it_src.sg && sg_dma_len(it_src.sg)); in intel_context_migrate_copy() 898 WARN_ON(it_dst.sg && sg_dma_len(it_dst.sg)); in intel_context_migrate_copy() 903 !it_dst.sg || !sg_dma_len(it_dst.sg) || in intel_context_migrate_copy() 905 !sg_dma_len(it_ccs.sg))))) { in intel_context_migrate_copy() [all …]
|
| A D | gen8_ppgtt.c | 469 GEM_BUG_ON(sg_dma_len(iter->sg) < I915_GTT_PAGE_SIZE); in gen8_ppgtt_insert_pte() 475 if (!iter->sg || sg_dma_len(iter->sg) == 0) { in gen8_ppgtt_insert_pte() 481 iter->max = iter->dma + sg_dma_len(iter->sg); in gen8_ppgtt_insert_pte() 510 unsigned int rem = sg_dma_len(iter->sg); in xehp_ppgtt_insert_huge() 594 rem = sg_dma_len(iter->sg); in xehp_ppgtt_insert_huge() 608 } while (iter->sg && sg_dma_len(iter->sg)); in xehp_ppgtt_insert_huge() 618 unsigned int rem = sg_dma_len(iter->sg); in gen8_ppgtt_insert_huge() 661 GEM_BUG_ON(sg_dma_len(iter->sg) < page_size); in gen8_ppgtt_insert_huge() 672 rem = sg_dma_len(iter->sg); in gen8_ppgtt_insert_huge() 732 } while (iter->sg && sg_dma_len(iter->sg)); in gen8_ppgtt_insert_huge()
|
| /linux/drivers/crypto/gemini/ |
| A D | sl3516-ce-cipher.c | 59 if ((sg_dma_len(sg) % 16) != 0) { in sl3516_ce_need_fallback() 75 if ((sg_dma_len(sg) % 16) != 0) { in sl3516_ce_need_fallback() 183 if (sg_dma_len(sg) == 0) in sl3516_ce_cipher() 186 todo = min(len, sg_dma_len(sg)); in sl3516_ce_cipher() 205 if (sg_dma_len(sg) == 0) in sl3516_ce_cipher() 208 todo = min(len, sg_dma_len(sg)); in sl3516_ce_cipher()
|
| /linux/drivers/spi/ |
| A D | spi-bcm2835.c | 498 bs->tx_prologue = sg_dma_len(&tfr->tx_sg.sgl[0]) & 3; in bcm2835_spi_transfer_prologue() 501 bs->rx_prologue = sg_dma_len(&tfr->rx_sg.sgl[0]) & 3; in bcm2835_spi_transfer_prologue() 509 !(sg_dma_len(&tfr->tx_sg.sgl[0]) & ~3); in bcm2835_spi_transfer_prologue() 535 sg_dma_len(&tfr->rx_sg.sgl[0]) -= bs->rx_prologue; in bcm2835_spi_transfer_prologue() 558 sg_dma_len(&tfr->tx_sg.sgl[0]) -= bs->tx_prologue; in bcm2835_spi_transfer_prologue() 560 sg_dma_len(&tfr->tx_sg.sgl[0]) = 0; in bcm2835_spi_transfer_prologue() 562 sg_dma_len(&tfr->tx_sg.sgl[1]) -= 4; in bcm2835_spi_transfer_prologue() 583 sg_dma_len(&tfr->rx_sg.sgl[0]) += bs->rx_prologue; in bcm2835_spi_undo_prologue() 591 sg_dma_len(&tfr->tx_sg.sgl[0]) += bs->tx_prologue; in bcm2835_spi_undo_prologue() 593 sg_dma_len(&tfr->tx_sg.sgl[0]) = bs->tx_prologue - 4; in bcm2835_spi_undo_prologue() [all …]
|
| /linux/drivers/gpu/drm/xe/ |
| A D | xe_res_cursor.h | 133 while (start >= sg_dma_len(sgl)) { in __xe_res_sg_next() 134 start -= sg_dma_len(sgl); in __xe_res_sg_next() 140 cur->size = sg_dma_len(sgl) - start; in __xe_res_sg_next()
|
| /linux/drivers/media/pci/intel/ipu6/ |
| A D | ipu6-dma.c | 352 if (sg_dma_len(sg) == 0 || in ipu6_dma_unmap_sg() 356 npages -= PHYS_PFN(PAGE_ALIGN(sg_dma_len(sg))); in ipu6_dma_unmap_sg() 419 npages += PHYS_PFN(PAGE_ALIGN(sg_dma_len(sg))); in ipu6_dma_map_sg() 435 sg_dma_len(sg)); in ipu6_dma_map_sg() 439 PAGE_ALIGN(sg_dma_len(sg))); in ipu6_dma_map_sg() 445 iova_addr += PHYS_PFN(PAGE_ALIGN(sg_dma_len(sg))); in ipu6_dma_map_sg()
|
| /linux/drivers/crypto/starfive/ |
| A D | jh7110-aes.c | 451 in_save = sg_dma_len(src); in starfive_aes_dma_xfer() 452 out_save = sg_dma_len(dst); in starfive_aes_dma_xfer() 457 sg_dma_len(src) = ALIGN(len, AES_BLOCK_SIZE); in starfive_aes_dma_xfer() 458 sg_dma_len(dst) = ALIGN(len, AES_BLOCK_SIZE); in starfive_aes_dma_xfer() 489 sg_dma_len(src) = in_save; in starfive_aes_dma_xfer() 490 sg_dma_len(dst) = out_save; in starfive_aes_dma_xfer() 518 len = min(sg_dma_len(stsg), remain); in starfive_aes_map_sg() 539 len = min(sg_dma_len(stsg), sg_dma_len(dtsg)); in starfive_aes_map_sg() 552 if (sg_dma_len(stsg) - len) { in starfive_aes_map_sg() 555 } else if (sg_dma_len(dtsg) - len) { in starfive_aes_map_sg() [all …]
|
| /linux/drivers/media/pci/ivtv/ |
| A D | ivtv-udma.c | 68 dma->SGarray[i].size = cpu_to_le32(sg_dma_len(sg)); in ivtv_udma_fill_sg_array() 71 buffer_offset += sg_dma_len(sg); in ivtv_udma_fill_sg_array() 73 split -= sg_dma_len(sg); in ivtv_udma_fill_sg_array()
|
| /linux/drivers/crypto/allwinner/sun8i-ss/ |
| A D | sun8i-ss-cipher.c | 144 if (sg_dma_len(sg) == 0) { in sun8i_ss_setup_ivs() 161 todo = min(len, sg_dma_len(sg)); in sun8i_ss_setup_ivs() 257 if (sg_dma_len(sg) == 0) in sun8i_ss_cipher() 260 todo = min(len, sg_dma_len(sg)); in sun8i_ss_cipher() 279 if (sg_dma_len(sg) == 0) in sun8i_ss_cipher() 282 todo = min(len, sg_dma_len(sg)); in sun8i_ss_cipher()
|
| /linux/drivers/gpu/drm/nouveau/nvkm/core/ |
| A D | firmware.c | 153 return sgl ? sg_dma_len(sgl) : 0; in nvkm_firmware_mem_size() 208 dma_free_noncoherent(fw->device->dev, sg_dma_len(&fw->mem.sgl), in nvkm_firmware_dtor() 253 sg_dma_len(&fw->mem.sgl) = len; in nvkm_firmware_ctor()
|
| /linux/drivers/media/pci/cx88/ |
| A D | cx88-core.c | 90 while (offset && offset >= sg_dma_len(sg)) { in cx88_risc_field() 91 offset -= sg_dma_len(sg); in cx88_risc_field() 98 if (bpl <= sg_dma_len(sg) - offset) { in cx88_risc_field() 108 (sg_dma_len(sg) - offset)); in cx88_risc_field() 110 todo -= (sg_dma_len(sg) - offset); in cx88_risc_field() 113 while (todo > sg_dma_len(sg)) { in cx88_risc_field() 115 sg_dma_len(sg)); in cx88_risc_field() 117 todo -= sg_dma_len(sg); in cx88_risc_field()
|
| /linux/drivers/crypto/ccp/ |
| A D | ccp-dmaengine.c | 384 src_len = sg_dma_len(src_sg); in ccp_create_desc() 387 dst_len = sg_dma_len(dst_sg); in ccp_create_desc() 400 src_len = sg_dma_len(src_sg); in ccp_create_desc() 414 dst_len = sg_dma_len(dst_sg); in ccp_create_desc() 493 sg_dma_len(&dst_sg) = len; in ccp_prep_dma_memcpy() 497 sg_dma_len(&src_sg) = len; in ccp_prep_dma_memcpy()
|
| /linux/drivers/iommu/ |
| A D | dma-iommu.c | 1264 sg_dma_len(s) = 0; in __finalise_sg() 1272 sg_dma_len(cur) = s_length; in __finalise_sg() 1303 sg_dma_len(cur) = cur_len; in __finalise_sg() 1327 if (sg_dma_len(s)) in __invalidate_sg() 1328 s->length = sg_dma_len(s); in __invalidate_sg() 1331 sg_dma_len(s) = 0; in __invalidate_sg() 1343 sg_dma_len(s), dir, attrs); in iommu_dma_unmap_sg_swiotlb() 1359 sg_dma_len(s) = s->length; in iommu_dma_map_sg_swiotlb() 1440 sg_dma_len(s) = s_length; in iommu_dma_map_sg() 1522 if (sg_dma_len(tmp) == 0) in iommu_dma_unmap_sg() [all …]
|