Home
last modified time | relevance | path

Searched refs:nents (Results 1 – 25 of 62) sorted by relevance

123

/drivers/parisc/
Dccio-rm-dma.c115 static int ccio_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) in ccio_map_sg() argument
117 int tmp = nents; in ccio_map_sg()
120 while (nents) { in ccio_map_sg()
123 nents--; in ccio_map_sg()
131 static void ccio_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) in ccio_unmap_sg() argument
134 while (nents) { in ccio_unmap_sg()
136 nents--; in ccio_unmap_sg()
Diommu-helpers.h14 iommu_fill_pdir(struct ioc *ioc, struct scatterlist *startsg, int nents, in iommu_fill_pdir() argument
29 while (nents-- > 0) { in iommu_fill_pdir()
33 DBG_RUN_SG(" %d : %08lx/%05x %08lx/%05x\n", nents, in iommu_fill_pdir()
101 struct scatterlist *startsg, int nents, in iommu_coalesce_chunks() argument
109 while (nents > 0) { in iommu_coalesce_chunks()
126 while(--nents > 0) { in iommu_coalesce_chunks()
Dsba_iommu.c274 sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents) in sba_dump_sg() argument
276 while (nents-- > 0) { in sba_dump_sg()
278 nents, in sba_dump_sg()
935 sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, in sba_map_sg() argument
942 DBG_RUN_SG("%s() START %d entries\n", __func__, nents); in sba_map_sg()
947 if (nents == 1) { in sba_map_sg()
960 sba_dump_sg(ioc, sglist, nents); in sba_map_sg()
977 coalesced = iommu_coalesce_chunks(ioc, dev, sglist, nents, sba_alloc_range); in sba_map_sg()
987 filled = iommu_fill_pdir(ioc, sglist, nents, 0, sba_io_pdir_entry); in sba_map_sg()
996 sba_dump_sg(ioc, sglist, nents); in sba_map_sg()
[all …]
Dccio-dma.c901 ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, in ccio_map_sg() argument
914 DBG_RUN_SG("%s() START %d entries\n", __func__, nents); in ccio_map_sg()
917 if (nents == 1) { in ccio_map_sg()
925 for(i = 0; i < nents; i++) in ccio_map_sg()
942 coalesced = iommu_coalesce_chunks(ioc, dev, sglist, nents, ccio_alloc_range); in ccio_map_sg()
952 filled = iommu_fill_pdir(ioc, sglist, nents, hint, ccio_io_pdir_entry); in ccio_map_sg()
978 ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, in ccio_unmap_sg() argument
987 __func__, nents, sg_virt_addr(sglist), sglist->length); in ccio_unmap_sg()
993 while(sg_dma_len(sglist) && nents--) { in ccio_unmap_sg()
1003 DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents); in ccio_unmap_sg()
/drivers/infiniband/core/
Dumem.c57 chunk->nents, DMA_BIDIRECTIONAL); in __ib_umem_release()
58 for (i = 0; i < chunk->nents; ++i) { in __ib_umem_release()
174 chunk->nents = min_t(int, ret, IB_UMEM_MAX_PAGE_CHUNK); in ib_umem_get()
175 sg_init_table(chunk->page_list, chunk->nents); in ib_umem_get()
176 for (i = 0; i < chunk->nents; ++i) { in ib_umem_get()
185 chunk->nents, in ib_umem_get()
189 for (i = 0; i < chunk->nents; ++i) in ib_umem_get()
197 ret -= chunk->nents; in ib_umem_get()
198 off += chunk->nents; in ib_umem_get()
/drivers/infiniband/hw/qib/
Dqib_dma.c95 int nents, enum dma_data_direction direction) in qib_map_sg() argument
100 int ret = nents; in qib_map_sg()
104 for_each_sg(sgl, sg, nents, i) { in qib_map_sg()
116 struct scatterlist *sg, int nents, in qib_unmap_sg() argument
/drivers/infiniband/hw/ipath/
Dipath_dma.c102 int nents, enum dma_data_direction direction) in ipath_map_sg() argument
107 int ret = nents; in ipath_map_sg()
111 for_each_sg(sgl, sg, nents, i) { in ipath_map_sg()
123 struct scatterlist *sg, int nents, in ipath_unmap_sg() argument
Dipath_mr.c207 n += chunk->nents; in ipath_reg_user_mr()
228 for (i = 0; i < chunk->nents; i++) { in ipath_reg_user_mr()
/drivers/spi/
Dspi-ep93xx.c559 int i, ret, nents; in ep93xx_spi_dma_prepare() local
599 nents = DIV_ROUND_UP(len, PAGE_SIZE); in ep93xx_spi_dma_prepare()
600 if (nents != sgt->nents) { in ep93xx_spi_dma_prepare()
603 ret = sg_alloc_table(sgt, nents, GFP_KERNEL); in ep93xx_spi_dma_prepare()
609 for_each_sg(sgt->sgl, sg, sgt->nents, i) { in ep93xx_spi_dma_prepare()
629 nents = dma_map_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); in ep93xx_spi_dma_prepare()
630 if (!nents) in ep93xx_spi_dma_prepare()
633 txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents, dir, DMA_CTRL_ACK); in ep93xx_spi_dma_prepare()
635 dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); in ep93xx_spi_dma_prepare()
663 dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); in ep93xx_spi_dma_finish()
Dspi-pl022.c763 pl022->sgt_tx.nents, DMA_TO_DEVICE); in unmap_free_dma_scatter()
765 pl022->sgt_rx.nents, DMA_FROM_DEVICE); in unmap_free_dma_scatter()
790 pl022->sgt_rx.nents, in dma_callback()
793 for_each_sg(pl022->sgt_rx.sgl, sg, pl022->sgt_rx.nents, i) { in dma_callback()
803 for_each_sg(pl022->sgt_tx.sgl, sg, pl022->sgt_tx.nents, i) { in dma_callback()
841 for_each_sg(sgtab->sgl, sg, sgtab->nents, i) { in setup_dma_scatter()
862 for_each_sg(sgtab->sgl, sg, sgtab->nents, i) { in setup_dma_scatter()
1017 pl022->sgt_rx.nents, DMA_FROM_DEVICE); in configure_dma()
1022 pl022->sgt_tx.nents, DMA_TO_DEVICE); in configure_dma()
1061 pl022->sgt_tx.nents, DMA_TO_DEVICE); in configure_dma()
[all …]
/drivers/scsi/
Dscsi_lib.c589 static inline unsigned int scsi_sgtable_index(unsigned short nents) in scsi_sgtable_index() argument
593 BUG_ON(nents > SCSI_MAX_SG_SEGMENTS); in scsi_sgtable_index()
595 if (nents <= 8) in scsi_sgtable_index()
598 index = get_count_order(nents) - 3; in scsi_sgtable_index()
603 static void scsi_sg_free(struct scatterlist *sgl, unsigned int nents) in scsi_sg_free() argument
607 sgp = scsi_sg_pools + scsi_sgtable_index(nents); in scsi_sg_free()
611 static struct scatterlist *scsi_sg_alloc(unsigned int nents, gfp_t gfp_mask) in scsi_sg_alloc() argument
615 sgp = scsi_sg_pools + scsi_sgtable_index(nents); in scsi_sg_alloc()
619 static int scsi_alloc_sgtable(struct scsi_data_buffer *sdb, int nents, in scsi_alloc_sgtable() argument
624 BUG_ON(!nents); in scsi_alloc_sgtable()
[all …]
/drivers/staging/rts5139/
Drts51x_transport.c397 io->sg, io->nents); in rts51x_sg_clean()
473 unsigned int *offset, int nents, size_t length, gfp_t mem_flags)
487 || (nents <= 0))
494 io->nents = nents;
507 first_sg, nents);
509 io->entries = nents;
608 int nents, size_t length, gfp_t mem_flags) in rts51x_sg_init() argument
610 return usb_sg_init(io, dev, pipe, period, sg, nents, length, mem_flags); in rts51x_sg_init()
/drivers/misc/
Dtifm_core.c295 int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, in tifm_map_sg() argument
298 return pci_map_sg(to_pci_dev(sock->dev.parent), sg, nents, direction); in tifm_map_sg()
302 void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, in tifm_unmap_sg() argument
305 pci_unmap_sg(to_pci_dev(sock->dev.parent), sg, nents, direction); in tifm_unmap_sg()
/drivers/iommu/
Domap-iovmm.c34 if (!sgt || !sgt->nents) in sgtable_offset()
49 for_each_sg(sgt->sgl, sg, sgt->nents, i) { in sgtable_len()
178 for_each_sg(sgt->sgl, sg, sgt->nents, i) { in vmap_sg()
382 for_each_sg(sgt->sgl, sg, sgt->nents, i) { in sgtable_fill_vmalloc()
422 for_each_sg(sgt->sgl, sg, sgt->nents, i) { in map_iovm_area()
476 for_each_sg(sgt->sgl, sg, sgt->nents, i) { in unmap_iovm_area()
/drivers/scsi/libfc/
Dfc_libfc.c113 u32 *nents, size_t *offset, in fc_copy_buffer_to_sglist() argument
128 if (!(*nents)) in fc_copy_buffer_to_sglist()
130 --(*nents); in fc_copy_buffer_to_sglist()
/drivers/dma/
Dcoh901318_lli.c233 struct scatterlist *sgl, unsigned int nents, in coh901318_lli_fill_sg() argument
258 for_each_sg(sgl, sg, nents, i) { in coh901318_lli_fill_sg()
265 } else if (i == nents - 1) in coh901318_lli_fill_sg()
Dcoh901318_lli.h119 struct scatterlist *sg, unsigned int nents,
/drivers/crypto/
Dpicoxcell_crypto.c295 unsigned nents, mapped_ents; in spacc_sg_to_ddt() local
300 nents = sg_count(payload, nbytes); in spacc_sg_to_ddt()
301 mapped_ents = dma_map_sg(engine->dev, payload, nents, dir); in spacc_sg_to_ddt()
317 dma_unmap_sg(engine->dev, payload, nents, dir); in spacc_sg_to_ddt()
328 unsigned nents = sg_count(areq->src, areq->cryptlen); in spacc_aead_make_ddts() local
350 src_ents = dma_map_sg(engine->dev, areq->src, nents, in spacc_aead_make_ddts()
352 dst_ents = dma_map_sg(engine->dev, areq->dst, nents, in spacc_aead_make_ddts()
355 src_ents = dma_map_sg(engine->dev, areq->src, nents, in spacc_aead_make_ddts()
412 unsigned nents = sg_count(areq->src, areq->cryptlen); in spacc_aead_free_ddts() local
415 dma_unmap_sg(engine->dev, areq->src, nents, DMA_TO_DEVICE); in spacc_aead_free_ddts()
[all …]
/drivers/gpu/ion/
Dion_heap.c48 for_each_sg(table->sgl, sg, table->nents, i) { in ion_heap_map_kernel()
80 for_each_sg(table->sgl, sg, table->nents, i) { in ion_heap_map_user()
120 for_each_sg(table->sgl, sg, table->nents, i) { in ion_heap_buffer_zero()
/drivers/media/common/
Dsaa7146_core.c194 pt->nents = pages; in saa7146_vmalloc_build_pgtable()
195 slen = pci_map_sg(pci,pt->slist,pt->nents,PCI_DMA_FROMDEVICE); in saa7146_vmalloc_build_pgtable()
205 pci_unmap_sg(pci, pt->slist, pt->nents, PCI_DMA_FROMDEVICE); in saa7146_vmalloc_build_pgtable()
219 pci_unmap_sg(pci, pt->slist, pt->nents, PCI_DMA_FROMDEVICE); in saa7146_vfree_destroy_pgtable()
/drivers/hsi/
Dhsi.c302 struct hsi_msg *hsi_alloc_msg(unsigned int nents, gfp_t flags) in hsi_alloc_msg() argument
311 if (!nents) in hsi_alloc_msg()
314 err = sg_alloc_table(&msg->sgt, nents, flags); in hsi_alloc_msg()
/drivers/infiniband/hw/cxgb3/
Dcxio_dbg.c139 void cxio_dump_rqt(struct cxio_rdev *rdev, u32 hwtid, int nents) in cxio_dump_rqt() argument
142 int size = nents * 64; in cxio_dump_rqt()
/drivers/block/
Dnvme.c304 int nents; /* Used in scatterlist */ member
377 dma_unmap_sg(&dev->pci_dev->dev, iod->sg, iod->nents, in bio_completion()
499 iod->nents = nsegs; in nvme_map_bio()
501 if (dma_map_sg(dev, iod->sg, iod->nents, dma_dir) == 0) { in nvme_map_bio()
1027 int i, err, count, nents, offset; in nvme_map_user_pages() local
1058 iod->nents = count; in nvme_map_user_pages()
1061 nents = dma_map_sg(&dev->pci_dev->dev, sg, count, in nvme_map_user_pages()
1063 if (!nents) in nvme_map_user_pages()
1083 dma_unmap_sg(&dev->pci_dev->dev, iod->sg, iod->nents, in nvme_unmap_user_pages()
1086 for (i = 0; i < iod->nents; i++) in nvme_unmap_user_pages()
/drivers/message/i2o/
Di2o_block.c320 int nents; in i2o_block_sglist_alloc() local
324 nents = blk_rq_map_sg(ireq->req->q, ireq->req, ireq->sg_table); in i2o_block_sglist_alloc()
331 ireq->sg_nents = nents; in i2o_block_sglist_alloc()
333 return i2o_dma_map_sg(c, ireq->sg_table, nents, direction, mptr); in i2o_block_sglist_alloc()
/drivers/block/mtip32xx/
Dmtip32xx.c1794 int nents) in fill_command_sg() argument
1803 for (n = 0; n < nents; n++) { in fill_command_sg()
2399 int nsect, int nents, int tag, void *callback, in mtip_hw_submit_io() argument
2408 nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir); in mtip_hw_submit_io()
2410 command->scatter_ents = nents; in mtip_hw_submit_io()
2434 fill_command_sg(dd, command, nents); in mtip_hw_submit_io()
2439 (nents << 16) | 5 | AHCI_CMD_PREFETCH); in mtip_hw_submit_io()
3484 int nents = 0; in mtip_make_request() local
3524 bio_for_each_segment(bvec, bio, nents) { in mtip_make_request()
3525 sg_set_page(&sg[nents], in mtip_make_request()
[all …]

123