/linux-4.1.27/arch/c6x/kernel/ |
H A D | dma.c | 65 int nents, enum dma_data_direction dir) dma_map_sg() 70 for_each_sg(sglist, sg, nents, i) dma_map_sg() 74 debug_dma_map_sg(dev, sglist, nents, nents, dir); dma_map_sg() 76 return nents; dma_map_sg() 82 int nents, enum dma_data_direction dir) dma_unmap_sg() 87 for_each_sg(sglist, sg, nents, i) dma_unmap_sg() 90 debug_dma_unmap_sg(dev, sglist, nents, dir); dma_unmap_sg() 115 int nents, enum dma_data_direction dir) dma_sync_sg_for_cpu() 120 for_each_sg(sglist, sg, nents, i) dma_sync_sg_for_cpu() 124 debug_dma_sync_sg_for_cpu(dev, sglist, nents, dir); dma_sync_sg_for_cpu() 130 int nents, enum dma_data_direction dir) dma_sync_sg_for_device() 135 for_each_sg(sglist, sg, nents, i) dma_sync_sg_for_device() 139 debug_dma_sync_sg_for_device(dev, sglist, nents, dir); dma_sync_sg_for_device() 64 dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir) dma_map_sg() argument 81 dma_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir) dma_unmap_sg() argument 114 dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir) dma_sync_sg_for_cpu() argument 129 dma_sync_sg_for_device(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir) dma_sync_sg_for_device() argument
|
/linux-4.1.27/drivers/crypto/caam/ |
H A D | sg_sw_sec4.h | 89 unsigned int nents, enum dma_data_direction dir, dma_map_sg_chained() 94 for (i = 0; i < nents; i++) { dma_map_sg_chained() 99 dma_map_sg(dev, sg, nents, dir); dma_map_sg_chained() 101 return nents; dma_map_sg_chained() 105 unsigned int nents, enum dma_data_direction dir, dma_unmap_sg_chained() 110 for (i = 0; i < nents; i++) { dma_unmap_sg_chained() 115 dma_unmap_sg(dev, sg, nents, dir); dma_unmap_sg_chained() 117 return nents; dma_unmap_sg_chained() 88 dma_map_sg_chained(struct device *dev, struct scatterlist *sg, unsigned int nents, enum dma_data_direction dir, bool chained) dma_map_sg_chained() argument 104 dma_unmap_sg_chained(struct device *dev, struct scatterlist *sg, unsigned int nents, enum dma_data_direction dir, bool chained) dma_unmap_sg_chained() argument
|
/linux-4.1.27/lib/ |
H A D | scatterlist.c | 52 int nents; sg_nents() local 53 for (nents = 0; sg; sg = sg_next(sg)) sg_nents() 54 nents++; sg_nents() 55 return nents; sg_nents() 63 * @nents: Number of entries in the scatterlist 70 * the important bit is that @nents@ denotes the number of entries that 74 struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents) sg_last() argument 77 struct scatterlist *ret = &sgl[nents - 1]; sg_last() 82 for_each_sg(sgl, sg, nents, i) sg_last() 97 * @nents: Number of entries in table 104 void sg_init_table(struct scatterlist *sgl, unsigned int nents) sg_init_table() argument 106 memset(sgl, 0, sizeof(*sgl) * nents); sg_init_table() 110 for (i = 0; i < nents; i++) sg_init_table() 114 sg_mark_end(&sgl[nents - 1]); sg_init_table() 136 static struct scatterlist *sg_kmalloc(unsigned int nents, gfp_t gfp_mask) sg_kmalloc() argument 138 if (nents == SG_MAX_SINGLE_ALLOC) { sg_kmalloc() 152 return kmalloc(nents * sizeof(struct scatterlist), gfp_mask); sg_kmalloc() 155 static void sg_kfree(struct scatterlist *sg, unsigned int nents) sg_kfree() argument 157 if (nents == SG_MAX_SINGLE_ALLOC) { sg_kfree() 231 * @nents: Number of entries in sg list 237 * This function returns a @table @nents long. The allocator is 239 * Thus if @nents is bigger than @max_ents, the scatterlists will be 247 int __sg_alloc_table(struct sg_table *table, unsigned int nents, __sg_alloc_table() argument 256 if (nents == 0) __sg_alloc_table() 259 if (WARN_ON_ONCE(nents > max_ents)) __sg_alloc_table() 263 left = nents; __sg_alloc_table() 290 table->nents = ++table->orig_nents; __sg_alloc_table() 296 table->nents = table->orig_nents += sg_size; __sg_alloc_table() 323 * @nents: Number of entries in sg list 327 * Allocate and initialize an sg table. If @nents@ is larger than 331 int sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) sg_alloc_table() argument 335 ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, sg_alloc_table() 409 struct scatterlist *sglist, unsigned int nents, __sg_page_iter_start() 413 piter->__nents = nents; __sg_page_iter_start() 448 * @nents: number of sg entries 457 unsigned int nents, unsigned int flags) sg_miter_start() 461 __sg_page_iter_start(&miter->piter, sgl, nents, 0); sg_miter_start() 611 * @nents: Number of SG entries 621 static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, sg_copy_buffer() argument 635 sg_miter_start(&miter, sgl, nents, sg_flags); sg_copy_buffer() 664 * @nents: Number of SG entries 671 size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, sg_copy_from_buffer() argument 674 return sg_copy_buffer(sgl, nents, buf, buflen, 0, false); sg_copy_from_buffer() 681 * @nents: Number of SG entries 688 size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, sg_copy_to_buffer() argument 691 return sg_copy_buffer(sgl, nents, buf, buflen, 0, true); sg_copy_to_buffer() 698 * @nents: Number of SG entries 706 size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, sg_pcopy_from_buffer() argument 709 return sg_copy_buffer(sgl, nents, buf, buflen, skip, false); sg_pcopy_from_buffer() 716 * @nents: Number of SG entries 724 size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents, sg_pcopy_to_buffer() argument 727 return sg_copy_buffer(sgl, nents, buf, buflen, skip, true); sg_pcopy_to_buffer() 408 __sg_page_iter_start(struct sg_page_iter *piter, struct scatterlist *sglist, unsigned int nents, unsigned long pgoffset) __sg_page_iter_start() argument 456 sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, unsigned int nents, unsigned int flags) sg_miter_start() argument
|
H A D | kfifo.c | 309 int nents, unsigned int len) setup_sgl_buf() 316 if (!nents) setup_sgl_buf() 336 if (++n == nents || sgl == NULL) setup_sgl_buf() 348 int nents, unsigned int len, unsigned int off) setup_sgl() 363 n = setup_sgl_buf(sgl, fifo->data + off, nents, l); setup_sgl() 364 n += setup_sgl_buf(sgl + n, fifo->data, nents - n, len - l); setup_sgl() 370 struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_in_prepare() 378 return setup_sgl(fifo, sgl, nents, len, fifo->in); __kfifo_dma_in_prepare() 383 struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_out_prepare() 391 return setup_sgl(fifo, sgl, nents, len, fifo->out); __kfifo_dma_out_prepare() 562 struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_in_prepare_r() 564 BUG_ON(!nents); __kfifo_dma_in_prepare_r() 571 return setup_sgl(fifo, sgl, nents, len, fifo->in + recsize); __kfifo_dma_in_prepare_r() 585 struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_out_prepare_r() 587 BUG_ON(!nents); __kfifo_dma_out_prepare_r() 594 return setup_sgl(fifo, sgl, nents, len, fifo->out + recsize); __kfifo_dma_out_prepare_r() 308 setup_sgl_buf(struct scatterlist *sgl, void *buf, int nents, unsigned int len) setup_sgl_buf() argument 347 setup_sgl(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, unsigned int off) setup_sgl() argument 369 __kfifo_dma_in_prepare(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_in_prepare() argument 382 __kfifo_dma_out_prepare(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len) __kfifo_dma_out_prepare() argument 561 __kfifo_dma_in_prepare_r(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_in_prepare_r() argument 584 __kfifo_dma_out_prepare_r(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) __kfifo_dma_out_prepare_r() argument
|
H A D | dma-debug.c | 65 * @sg_call_ents: 'nents' from dma_map_sg 451 * other hand, consumes a single dma_debug_entry, but inserts 'nents' 573 unsigned int nents, i; debug_dma_assert_idle() local 585 nents = radix_tree_gang_lookup(&dma_active_cacheline, results, cln, debug_dma_assert_idle() 587 for (i = 0; i < nents; i++) { debug_dma_assert_idle() 1355 int nents, int mapped_ents, int direction) debug_dma_map_sg() 1376 entry->sg_call_ents = nents; for_each_sg() 1354 debug_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, int mapped_ents, int direction) debug_dma_map_sg() argument
|
H A D | swiotlb.c | 866 * used, at most nents.
|
/linux-4.1.27/samples/kfifo/ |
H A D | dma-example.c | 27 unsigned int nents; example_init() local 65 nents = kfifo_dma_in_prepare(&fifo, sg, ARRAY_SIZE(sg), FIFO_SIZE); example_init() 66 printk(KERN_INFO "DMA sgl entries: %d\n", nents); example_init() 67 if (!nents) { example_init() 75 for (i = 0; i < nents; i++) { example_init() 95 nents = kfifo_dma_out_prepare(&fifo, sg, ARRAY_SIZE(sg), 8); example_init() 96 printk(KERN_INFO "DMA sgl entries: %d\n", nents); example_init() 97 if (!nents) { example_init() 104 for (i = 0; i < nents; i++) { example_init()
|
/linux-4.1.27/drivers/crypto/qce/ |
H A D | dma.c | 57 int qce_mapsg(struct device *dev, struct scatterlist *sg, int nents, qce_mapsg() argument 70 err = dma_map_sg(dev, sg, nents, dir); qce_mapsg() 75 return nents; qce_mapsg() 78 void qce_unmapsg(struct device *dev, struct scatterlist *sg, int nents, qce_unmapsg() argument 87 dma_unmap_sg(dev, sg, nents, dir); qce_unmapsg() 93 int nents = 0; qce_countsg() local 99 nents++; qce_countsg() 106 return nents; qce_countsg() 135 int nents, unsigned long flags, qce_dma_prep_sg() 142 if (!sg || !nents) qce_dma_prep_sg() 145 desc = dmaengine_prep_slave_sg(chan, sg, nents, dir, flags); qce_dma_prep_sg() 134 qce_dma_prep_sg(struct dma_chan *chan, struct scatterlist *sg, int nents, unsigned long flags, enum dma_transfer_direction dir, dma_async_tx_callback cb, void *cb_param) qce_dma_prep_sg() argument
|
H A D | dma.h | 53 void qce_unmapsg(struct device *dev, struct scatterlist *sg, int nents, 55 int qce_mapsg(struct device *dev, struct scatterlist *sg, int nents,
|
/linux-4.1.27/arch/sh/kernel/ |
H A D | dma-nommu.c | 27 int nents, enum dma_data_direction dir, nommu_map_sg() 33 WARN_ON(nents == 0 || sg[0].length == 0); nommu_map_sg() 35 for_each_sg(sg, s, nents, i) { for_each_sg() 44 return nents; 26 nommu_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) nommu_map_sg() argument
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | pci-nommu.c | 51 * used, at most nents. 57 int nents, enum dma_data_direction dir, nommu_map_sg() 63 WARN_ON(nents == 0 || sg[0].length == 0); nommu_map_sg() 65 for_each_sg(sg, s, nents, i) { for_each_sg() 73 return nents; 56 nommu_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) nommu_map_sg() argument
|
H A D | amd_gart_64.c | 288 static void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, gart_unmap_sg() argument 294 for_each_sg(sg, s, nents, i) { for_each_sg() 303 int nents, int dir) dma_map_sg_nonforce() 312 for_each_sg(sg, s, nents, i) { for_each_sg() 320 nents = 0; for_each_sg() 330 return nents; 389 static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, gart_map_sg() argument 398 if (nents == 0) gart_map_sg() 412 for_each_sg(sg, s, nents, i) { for_each_sg() 452 if (out < nents) { 464 out = dma_map_sg_nonforce(dev, sg, nents, dir); 472 for_each_sg(sg, s, nents, i) 302 dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg, int nents, int dir) dma_map_sg_nonforce() argument
|
/linux-4.1.27/drivers/spi/ |
H A D | spi-pxa2xx-dma.c | 26 int i, nents, len = drv_data->len; pxa2xx_spi_map_dma_buffer() local 44 nents = DIV_ROUND_UP(len, SZ_2K); pxa2xx_spi_map_dma_buffer() 45 if (nents != sgt->nents) { pxa2xx_spi_map_dma_buffer() 49 ret = sg_alloc_table(sgt, nents, GFP_ATOMIC); pxa2xx_spi_map_dma_buffer() 55 for_each_sg(sgt->sgl, sg, sgt->nents, i) { pxa2xx_spi_map_dma_buffer() 67 nents = dma_map_sg(dmadev, sgt->sgl, sgt->nents, dir); pxa2xx_spi_map_dma_buffer() 68 if (!nents) pxa2xx_spi_map_dma_buffer() 71 return nents; pxa2xx_spi_map_dma_buffer() 88 dma_unmap_sg(dmadev, sgt->sgl, sgt->nents, dir); pxa2xx_spi_unmap_dma_buffer() 168 int nents, ret; pxa2xx_spi_dma_prepare_one() local 191 nents = drv_data->tx_nents; pxa2xx_spi_dma_prepare_one() 199 nents = drv_data->rx_nents; pxa2xx_spi_dma_prepare_one() 209 return dmaengine_prep_slave_sg(chan, sgt->sgl, nents, dir, pxa2xx_spi_dma_prepare_one()
|
H A D | spi-ep93xx.c | 443 int i, ret, nents; ep93xx_spi_dma_prepare() local 483 nents = DIV_ROUND_UP(len, PAGE_SIZE); ep93xx_spi_dma_prepare() 484 if (nents != sgt->nents) { ep93xx_spi_dma_prepare() 487 ret = sg_alloc_table(sgt, nents, GFP_KERNEL); ep93xx_spi_dma_prepare() 493 for_each_sg(sgt->sgl, sg, sgt->nents, i) { ep93xx_spi_dma_prepare() 513 nents = dma_map_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); ep93xx_spi_dma_prepare() 514 if (!nents) ep93xx_spi_dma_prepare() 517 txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents, dir, DMA_CTRL_ACK); ep93xx_spi_dma_prepare() 519 dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); ep93xx_spi_dma_prepare() 547 dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); ep93xx_spi_dma_finish()
|
H A D | spi-qup.c | 294 unsigned int nents; spi_qup_prep_sg() local 298 nents = xfer->tx_sg.nents; spi_qup_prep_sg() 302 nents = xfer->rx_sg.nents; spi_qup_prep_sg() 306 desc = dmaengine_prep_slave_sg(chan, sgl, nents, dir, flags); spi_qup_prep_sg()
|
H A D | spi-dw-mid.c | 169 xfer->tx_sg.nents, dw_spi_dma_prepare_tx() 215 xfer->rx_sg.nents, dw_spi_dma_prepare_rx()
|
H A D | spi-pl022.c | 814 pl022->sgt_tx.nents, DMA_TO_DEVICE); unmap_free_dma_scatter() 816 pl022->sgt_rx.nents, DMA_FROM_DEVICE); unmap_free_dma_scatter() 841 pl022->sgt_rx.nents, dma_callback() 844 for_each_sg(pl022->sgt_rx.sgl, sg, pl022->sgt_rx.nents, i) { dma_callback() 854 for_each_sg(pl022->sgt_tx.sgl, sg, pl022->sgt_tx.nents, i) { dma_callback() 891 for_each_sg(sgtab->sgl, sg, sgtab->nents, i) { setup_dma_scatter() 912 for_each_sg(sgtab->sgl, sg, sgtab->nents, i) { setup_dma_scatter() 1067 pl022->sgt_rx.nents, DMA_FROM_DEVICE); configure_dma() 1072 pl022->sgt_tx.nents, DMA_TO_DEVICE); configure_dma() 1111 pl022->sgt_tx.nents, DMA_TO_DEVICE); configure_dma() 1114 pl022->sgt_rx.nents, DMA_FROM_DEVICE); configure_dma()
|
H A D | spi-img-spfi.c | 339 xfer->rx_sg.nents, img_spfi_start_dma() 363 xfer->tx_sg.nents, img_spfi_start_dma()
|
H A D | spi-rockchip.c | 457 rs->rx_sg.sgl, rs->rx_sg.nents, rockchip_spi_prepare_dma() 474 rs->tx_sg.sgl, rs->tx_sg.nents, rockchip_spi_prepare_dma()
|
H A D | spi-imx.c | 907 tx->sgl, tx->nents, DMA_MEM_TO_DEV, spi_imx_dma_transfer() 919 rx->sgl, rx->nents, DMA_DEV_TO_MEM, spi_imx_dma_transfer()
|
H A D | spi-rspi.c | 526 rx->sgl, rx->nents, DMA_FROM_DEVICE, rspi_dma_transfer() 546 tx->sgl, tx->nents, DMA_TO_DEVICE, rspi_dma_transfer()
|
H A D | spi-s3c64xx.c | 303 desc = dmaengine_prep_slave_sg(dma->ch, sgt->sgl, sgt->nents, prepare_dma()
|
H A D | spi.c | 511 ret = dma_map_sg(dev, sgt->sgl, sgt->nents, dir); spi_map_buf() 519 sgt->nents = ret; spi_map_buf()
|
/linux-4.1.27/arch/frv/mb93090-mb00/ |
H A D | pci-dma.c | 53 int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 64 for (i = 0; i < nents; i++) { dma_map_sg() 78 return nents; dma_map_sg()
|
H A D | pci-dma-nommu.c | 122 int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 127 for (i=0; i<nents; i++) dma_map_sg() 133 return nents; dma_map_sg()
|
/linux-4.1.27/arch/m68k/kernel/ |
H A D | dma.c | 123 void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, dma_sync_sg_for_device() argument 128 for (i = 0; i < nents; sg++, i++) dma_sync_sg_for_device() 154 int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 159 for (i = 0; i < nents; sg++, i++) { dma_map_sg() 163 return nents; dma_map_sg()
|
/linux-4.1.27/drivers/parisc/ |
H A D | ccio-rm-dma.c | 115 static int ccio_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) ccio_map_sg() argument 117 int tmp = nents; ccio_map_sg() 120 while (nents) { ccio_map_sg() 123 nents--; ccio_map_sg() 131 static void ccio_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) ccio_unmap_sg() argument 134 while (nents) { ccio_unmap_sg() 136 nents--; ccio_unmap_sg()
|
H A D | iommu-helpers.h | 7 * @nents: The number of entries in the scatter/gather list. 14 iommu_fill_pdir(struct ioc *ioc, struct scatterlist *startsg, int nents, iommu_fill_pdir() argument 29 while (nents-- > 0) { iommu_fill_pdir() 33 DBG_RUN_SG(" %d : %08lx/%05x %p/%05x\n", nents, iommu_fill_pdir() 101 struct scatterlist *startsg, int nents, iommu_coalesce_chunks() 113 while (nents > 0) { iommu_coalesce_chunks() 130 while(--nents > 0) { iommu_coalesce_chunks() 100 iommu_coalesce_chunks(struct ioc *ioc, struct device *dev, struct scatterlist *startsg, int nents, int (*iommu_alloc_range)(struct ioc *, struct device *, size_t)) iommu_coalesce_chunks() argument
|
H A D | sba_iommu.c | 269 * @nents: number of entries in SG list 274 sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents) sba_dump_sg() argument 276 while (nents-- > 0) { sba_dump_sg() 278 nents, sba_dump_sg() 929 * @nents: number of entries in list 935 sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, sba_map_sg() argument 942 DBG_RUN_SG("%s() START %d entries\n", __func__, nents); sba_map_sg() 947 if (nents == 1) { sba_map_sg() 959 sba_dump_sg(ioc, sglist, nents); sba_map_sg() 976 coalesced = iommu_coalesce_chunks(ioc, dev, sglist, nents, sba_alloc_range); sba_map_sg() 986 filled = iommu_fill_pdir(ioc, sglist, nents, 0, sba_io_pdir_entry); sba_map_sg() 995 sba_dump_sg(ioc, sglist, nents); sba_map_sg() 1012 * @nents: number of entries in list 1018 sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, sba_unmap_sg() argument 1027 __func__, nents, sg_virt(sglist), sglist->length); sba_unmap_sg() 1041 while (sg_dma_len(sglist) && nents--) { sba_unmap_sg() 1051 DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents); sba_unmap_sg()
|
H A D | ccio-dma.c | 895 * @nents: The number of entries in the scatter/gather list. 901 ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ccio_map_sg() argument 914 DBG_RUN_SG("%s() START %d entries\n", __func__, nents); ccio_map_sg() 917 if (nents == 1) { ccio_map_sg() 925 for(i = 0; i < nents; i++) ccio_map_sg() 942 coalesced = iommu_coalesce_chunks(ioc, dev, sglist, nents, ccio_alloc_range); ccio_map_sg() 952 filled = iommu_fill_pdir(ioc, sglist, nents, hint, ccio_io_pdir_entry); ccio_map_sg() 972 * @nents: The number of entries in the scatter/gather list. 978 ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ccio_unmap_sg() argument 987 __func__, nents, sg_virt(sglist), sglist->length); ccio_unmap_sg() 993 while(sg_dma_len(sglist) && nents--) { ccio_unmap_sg() 1003 DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents); ccio_unmap_sg()
|
/linux-4.1.27/arch/microblaze/kernel/ |
H A D | dma.c | 55 int nents, enum dma_data_direction direction, dma_direct_map_sg() 62 for_each_sg(sgl, sg, nents, i) { for_each_sg() 68 return nents; 131 struct scatterlist *sgl, int nents, dma_direct_sync_sg_for_cpu() 139 for_each_sg(sgl, sg, nents, i) dma_direct_sync_sg_for_cpu() 145 struct scatterlist *sgl, int nents, dma_direct_sync_sg_for_device() 153 for_each_sg(sgl, sg, nents, i) dma_direct_sync_sg_for_device() 54 dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) dma_direct_map_sg() argument 130 dma_direct_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction) dma_direct_sync_sg_for_cpu() argument 144 dma_direct_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction) dma_direct_sync_sg_for_device() argument
|
/linux-4.1.27/drivers/mmc/core/ |
H A D | sdio_ops.c | 129 unsigned int nents, left_size, i; mmc_io_rw_extended() local 160 nents = (left_size - 1) / seg_size + 1; mmc_io_rw_extended() 161 if (nents > 1) { mmc_io_rw_extended() 162 if (sg_alloc_table(&sgtable, nents, GFP_KERNEL)) mmc_io_rw_extended() 166 data.sg_len = nents; mmc_io_rw_extended() 185 if (nents > 1)
|
/linux-4.1.27/arch/mips/loongson/common/ |
H A D | dma-swiotlb.c | 69 int nents, enum dma_data_direction dir, loongson_dma_map_sg() 72 int r = swiotlb_map_sg_attrs(dev, sg, nents, dir, NULL); loongson_dma_map_sg() 87 struct scatterlist *sg, int nents, loongson_dma_sync_sg_for_device() 90 swiotlb_sync_sg_for_device(dev, sg, nents, dir); loongson_dma_sync_sg_for_device() 68 loongson_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) loongson_dma_map_sg() argument 86 loongson_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) loongson_dma_sync_sg_for_device() argument
|
/linux-4.1.27/arch/c6x/include/asm/ |
H A D | dma-mapping.h | 54 int nents, enum dma_data_direction direction); 57 int nents, enum dma_data_direction direction); 88 int nents, enum dma_data_direction dir); 91 int nents, enum dma_data_direction dir);
|
/linux-4.1.27/include/asm-generic/ |
H A D | pci-dma-compat.h | 66 int nents, int direction) pci_map_sg() 68 return dma_map_sg(hwdev == NULL ? NULL : &hwdev->dev, sg, nents, (enum dma_data_direction)direction); pci_map_sg() 73 int nents, int direction) pci_unmap_sg() 75 dma_unmap_sg(hwdev == NULL ? NULL : &hwdev->dev, sg, nents, (enum dma_data_direction)direction); pci_unmap_sg() 65 pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) pci_map_sg() argument 72 pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) pci_unmap_sg() argument
|
H A D | dma-mapping-common.h | 47 int nents, enum dma_data_direction dir, dma_map_sg_attrs() 54 for_each_sg(sg, s, nents, i) dma_map_sg_attrs() 57 ents = ops->map_sg(dev, sg, nents, dir, attrs); dma_map_sg_attrs() 59 debug_dma_map_sg(dev, sg, nents, ents, dir); dma_map_sg_attrs() 65 int nents, enum dma_data_direction dir, 71 debug_dma_unmap_sg(dev, sg, nents, dir); 73 ops->unmap_sg(dev, sg, nents, dir, attrs); 46 dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) dma_map_sg_attrs() argument
|
H A D | dma-mapping-broken.h | 47 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
/linux-4.1.27/include/linux/ |
H A D | dma-mapping.h | 42 int nents, enum dma_data_direction dir, 45 struct scatterlist *sg, int nents, 55 struct scatterlist *sg, int nents, 58 struct scatterlist *sg, int nents, 267 #define dma_map_sg_attrs(dev, sgl, nents, dir, attrs) \ 268 dma_map_sg(dev, sgl, nents, dir) 270 #define dma_unmap_sg_attrs(dev, sgl, nents, dir, attrs) \ 271 dma_unmap_sg(dev, sgl, nents, dir)
|
H A D | scatterlist.h | 14 unsigned int nents; /* number of mapped entries */ member in struct:sg_table 242 size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, 244 size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, 247 size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, 249 size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents, 280 struct scatterlist *sglist, unsigned int nents, 305 * @nents: maximum number of sg entries to iterate over 308 #define for_each_sg_page(sglist, piter, nents, pgoffset) \ 309 for (__sg_page_iter_start((piter), (sglist), (nents), (pgoffset)); \ 347 unsigned int nents, unsigned int flags);
|
H A D | swiotlb.h | 74 swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, 78 swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
|
H A D | tifm.h | 148 int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, 150 void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents,
|
H A D | dma-debug.h | 48 int nents, int mapped_ents, int direction); 124 int nents, int mapped_ents, int direction) debug_dma_map_sg() 123 debug_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, int mapped_ents, int direction) debug_dma_map_sg() argument
|
H A D | iommu.h | 152 struct scatterlist *sg, unsigned int nents, int prot); 201 struct scatterlist *sg,unsigned int nents, 290 unsigned int nents, int prot) iommu_map_sg() 292 return domain->ops->map_sg(domain, iova, sg, nents, prot); iommu_map_sg() 349 unsigned int nents, int prot) iommu_map_sg() 288 iommu_map_sg(struct iommu_domain *domain, unsigned long iova, struct scatterlist *sg, unsigned int nents, int prot) iommu_map_sg() argument 347 iommu_map_sg(struct iommu_domain *domain, unsigned long iova, struct scatterlist *sg, unsigned int nents, int prot) iommu_map_sg() argument
|
H A D | kfifo.h | 649 * @nents: number of entries in the scatterlist array 658 #define kfifo_dma_in_prepare(fifo, sgl, nents, len) \ 662 int __nents = (nents); \ 698 * @nents: number of entries in the scatterlist array 709 #define kfifo_dma_out_prepare(fifo, sgl, nents, len) \ 713 int __nents = (nents); \ 792 struct scatterlist *sgl, int nents, unsigned int len); 795 struct scatterlist *sgl, int nents, unsigned int len); 814 struct scatterlist *sgl, int nents, unsigned int len, size_t recsize); 820 struct scatterlist *sgl, int nents, unsigned int len, size_t recsize);
|
H A D | nvme.h | 137 int nents; /* Used in scatterlist */ member in struct:nvme_iod
|
H A D | usb.h | 1664 struct scatterlist *sg, int nents); 1758 int nents,
|
/linux-4.1.27/arch/arc/include/asm/ |
H A D | dma-mapping.h | 123 int nents, enum dma_data_direction dir) dma_map_sg() 128 for_each_sg(sg, s, nents, i) dma_map_sg() 132 return nents; dma_map_sg() 137 int nents, enum dma_data_direction dir) dma_unmap_sg() 142 for_each_sg(sg, s, nents, i) dma_unmap_sg() 122 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) dma_map_sg() argument 136 dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) dma_unmap_sg() argument
|
/linux-4.1.27/arch/tile/kernel/ |
H A D | pci-dma.c | 204 int nents, enum dma_data_direction direction, tile_dma_map_sg() 212 WARN_ON(nents == 0 || sglist->length == 0); tile_dma_map_sg() 214 for_each_sg(sglist, sg, nents, i) { for_each_sg() 222 return nents; 226 int nents, enum dma_data_direction direction, tile_dma_unmap_sg() 233 for_each_sg(sglist, sg, nents, i) { for_each_sg() 377 int nents, enum dma_data_direction direction, tile_pci_dma_map_sg() 385 WARN_ON(nents == 0 || sglist->length == 0); tile_pci_dma_map_sg() 387 for_each_sg(sglist, sg, nents, i) { for_each_sg() 397 return nents; 401 struct scatterlist *sglist, int nents, tile_pci_dma_unmap_sg() 409 for_each_sg(sglist, sg, nents, i) { for_each_sg() 203 tile_dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) tile_dma_map_sg() argument 225 tile_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) tile_dma_unmap_sg() argument 376 tile_pci_dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) tile_pci_dma_map_sg() argument 400 tile_pci_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) tile_pci_dma_unmap_sg() argument
|
/linux-4.1.27/arch/blackfin/kernel/ |
H A D | dma-mapping.c | 116 dma_map_sg(struct device *dev, struct scatterlist *sg_list, int nents, dma_map_sg() argument 122 for_each_sg(sg_list, sg, nents, i) { for_each_sg() 127 return nents;
|
/linux-4.1.27/arch/alpha/kernel/ |
H A D | pci-noop.c | 141 static int alpha_noop_map_sg(struct device *dev, struct scatterlist *sgl, int nents, alpha_noop_map_sg() argument 147 for_each_sg(sgl, sg, nents, i) { for_each_sg() 156 return nents;
|
H A D | pci_iommu.c | 654 int nents, enum dma_data_direction dir, alpha_pci_map_sg() 669 if (nents == 1) { alpha_pci_map_sg() 678 end = sg + nents; alpha_pci_map_sg() 732 int nents, enum dma_data_direction dir, alpha_pci_unmap_sg() 758 for (end = sg + nents; sg < end; ++sg) { alpha_pci_unmap_sg() 772 sg - end + nents, addr, size); alpha_pci_unmap_sg() 780 sg - end + nents, addr, size); alpha_pci_unmap_sg() 785 sg - end + nents, addr, size); alpha_pci_unmap_sg() 804 DBGA("pci_unmap_sg: %ld entries\n", nents - (end - sg)); 652 alpha_pci_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) alpha_pci_map_sg() argument 730 alpha_pci_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) alpha_pci_unmap_sg() argument
|
/linux-4.1.27/drivers/infiniband/hw/ipath/ |
H A D | ipath_dma.c | 102 int nents, enum dma_data_direction direction) ipath_map_sg() 107 int ret = nents; ipath_map_sg() 111 for_each_sg(sgl, sg, nents, i) { for_each_sg() 127 struct scatterlist *sg, int nents, ipath_unmap_sg() 101 ipath_map_sg(struct ib_device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction) ipath_map_sg() argument 126 ipath_unmap_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) ipath_unmap_sg() argument
|
/linux-4.1.27/drivers/infiniband/hw/qib/ |
H A D | qib_dma.c | 95 int nents, enum dma_data_direction direction) qib_map_sg() 100 int ret = nents; qib_map_sg() 104 for_each_sg(sgl, sg, nents, i) { for_each_sg() 120 struct scatterlist *sg, int nents, qib_unmap_sg() 94 qib_map_sg(struct ib_device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction) qib_map_sg() argument 119 qib_unmap_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) qib_unmap_sg() argument
|
/linux-4.1.27/arch/mn10300/include/asm/ |
H A D | dma-mapping.h | 51 int dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, dma_map_sg() argument 58 WARN_ON(nents == 0 || sglist[0].length == 0); dma_map_sg() 60 for_each_sg(sglist, sg, nents, i) { for_each_sg() 67 return nents;
|
/linux-4.1.27/arch/hexagon/kernel/ |
H A D | dma.c | 118 int nents, enum dma_data_direction dir, hexagon_map_sg() 124 WARN_ON(nents == 0 || sg[0].length == 0); hexagon_map_sg() 126 for_each_sg(sg, s, nents, i) { for_each_sg() 137 return nents; 117 hexagon_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) hexagon_map_sg() argument
|
/linux-4.1.27/arch/metag/include/asm/ |
H A D | dma-mapping.h | 48 dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, dma_map_sg() argument 55 WARN_ON(nents == 0 || sglist[0].length == 0); dma_map_sg() 57 for_each_sg(sglist, sg, nents, i) { for_each_sg() 64 return nents;
|
/linux-4.1.27/tools/virtio/linux/ |
H A D | scatterlist.h | 159 static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) sg_init_table() argument 161 memset(sgl, 0, sizeof(*sgl) * nents); sg_init_table() 165 for (i = 0; i < nents; i++) sg_init_table() 169 sg_mark_end(&sgl[nents - 1]); sg_init_table()
|
/linux-4.1.27/drivers/gpu/drm/exynos/ |
H A D | exynos_drm_dmabuf.c | 59 dma_unmap_sg(attach->dev, sgt->sgl, sgt->nents, exynos_gem_detach_dma_buf() 78 int nents, ret; exynos_gem_map_dma_buf() local 109 nents = dma_map_sg(attach->dev, sgt->sgl, sgt->orig_nents, dir); exynos_gem_map_dma_buf() 110 if (!nents) { exynos_gem_map_dma_buf() 254 if (sgt->nents == 1) { exynos_dmabuf_prime_import() 255 /* always physically continuous memory if sgt->nents is 1. */ exynos_dmabuf_prime_import()
|
H A D | exynos_drm_gem.c | 99 for_each_sg(buf->sgt->sgl, sgl, buf->sgt->nents, i) { exynos_drm_gem_map_buf() 482 int nents; exynos_gem_map_sgt_with_dma() local 486 nents = dma_map_sg(drm_dev->dev, sgt->sgl, sgt->nents, dir); exynos_gem_map_sgt_with_dma() 487 if (!nents) { exynos_gem_map_sgt_with_dma() 490 return nents; exynos_gem_map_sgt_with_dma() 501 dma_unmap_sg(drm_dev->dev, sgt->sgl, sgt->nents, dir); exynos_gem_unmap_sgt_from_dma()
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | dma.c | 129 int nents, enum dma_data_direction direction, dma_direct_map_sg() 135 for_each_sg(sgl, sg, nents, i) { for_each_sg() 141 return nents; 145 int nents, enum dma_data_direction direction, dma_direct_unmap_sg() 196 struct scatterlist *sgl, int nents, dma_direct_sync_sg() 202 for_each_sg(sgl, sg, nents, i) dma_direct_sync_sg() 128 dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) dma_direct_map_sg() argument 144 dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) dma_direct_unmap_sg() argument 195 dma_direct_sync_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction) dma_direct_sync_sg() argument
|
H A D | ibmebus.c | 107 int nents, enum dma_data_direction direction, ibmebus_map_sg() 113 for_each_sg(sgl, sg, nents, i) { for_each_sg() 118 return nents; 123 int nents, enum dma_data_direction direction, ibmebus_unmap_sg() 105 ibmebus_map_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ibmebus_map_sg() argument 121 ibmebus_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ibmebus_unmap_sg() argument
|
/linux-4.1.27/arch/avr32/include/asm/ |
H A D | dma-mapping.h | 193 * @nents: number of buffers to map 206 * used, at most nents. 212 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 217 for (i = 0; i < nents; i++) { dma_map_sg() 225 return nents; dma_map_sg() 232 * @nents: number of buffers to map 303 * @nents: number of buffers to map 314 int nents, enum dma_data_direction direction) dma_sync_sg_for_cpu() 325 int nents, enum dma_data_direction direction) dma_sync_sg_for_device() 329 for (i = 0; i < nents; i++) { dma_sync_sg_for_device() 313 dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) dma_sync_sg_for_cpu() argument 324 dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) dma_sync_sg_for_device() argument
|
/linux-4.1.27/drivers/infiniband/hw/usnic/ |
H A D | usnic_uiom.c | 88 for_each_sg(chunk->page_list, sg, chunk->nents, i) { list_for_each_entry_safe() 168 chunk->nents = min_t(int, ret, USNIC_UIOM_PAGE_CHUNK); usnic_uiom_get_pages() 169 sg_init_table(chunk->page_list, chunk->nents); usnic_uiom_get_pages() 170 for_each_sg(chunk->page_list, sg, chunk->nents, i) { usnic_uiom_get_pages() 177 cur_base += chunk->nents * PAGE_SIZE; usnic_uiom_get_pages() 178 ret -= chunk->nents; usnic_uiom_get_pages() 179 off += chunk->nents; usnic_uiom_get_pages() 266 for (i = 0; i < chunk->nents; i++, va += PAGE_SIZE) { list_for_each_entry() 317 if (i == chunk->nents) { list_for_each_entry()
|
H A D | usnic_uiom.h | 63 int nents; member in struct:usnic_uiom_chunk
|
/linux-4.1.27/arch/parisc/kernel/ |
H A D | pci-dma.c | 478 static int pa11_dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction) pa11_dma_map_sg() argument 484 for (i = 0; i < nents; i++, sglist++ ) { pa11_dma_map_sg() 490 return nents; pa11_dma_map_sg() 493 static void pa11_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction) pa11_dma_unmap_sg() argument 504 for (i = 0; i < nents; i++, sglist++ ) pa11_dma_unmap_sg() 523 static void pa11_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction) pa11_dma_sync_sg_for_cpu() argument 529 for (i = 0; i < nents; i++, sglist++ ) pa11_dma_sync_sg_for_cpu() 533 static void pa11_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction) pa11_dma_sync_sg_for_device() argument 539 for (i = 0; i < nents; i++, sglist++ ) pa11_dma_sync_sg_for_device()
|
/linux-4.1.27/drivers/staging/android/ion/ |
H A D | ion_heap.c | 48 for_each_sg(table->sgl, sg, table->nents, i) { ion_heap_map_kernel() 81 for_each_sg(table->sgl, sg, table->nents, i) { ion_heap_map_user() 118 static int ion_heap_sglist_zero(struct scatterlist *sgl, unsigned int nents, ion_heap_sglist_zero() argument 126 for_each_sg_page(sgl, &piter, nents, 0) { ion_heap_sglist_zero() 151 return ion_heap_sglist_zero(table->sgl, table->nents, pgprot); ion_heap_buffer_zero()
|
H A D | ion_chunk_heap.c | 108 dma_sync_sg_for_device(NULL, table->sgl, table->nents, ion_chunk_heap_free() 111 for_each_sg(table->sgl, sg, table->nents, i) { ion_chunk_heap_free()
|
H A D | ion_carveout_heap.c | 119 dma_sync_sg_for_device(NULL, table->sgl, table->nents, ion_carveout_heap_free()
|
H A D | ion_system_heap.c | 193 for_each_sg(table->sgl, sg, table->nents, i) ion_system_heap_free()
|
H A D | ion_test.c | 66 for_each_sg_page(table->sgl, &sg_iter, table->nents, offset_page) { ion_handle_test_dma()
|
H A D | ion.c | 232 for_each_sg(table->sgl, sg, table->nents, i) { ion_buffer_create() 255 for_each_sg(buffer->sg_table->sgl, sg, buffer->sg_table->nents, i) ion_buffer_create() 1221 buffer->sg_table->nents, DMA_BIDIRECTIONAL); ion_sync_for_device()
|
/linux-4.1.27/drivers/gpu/drm/i915/ |
H A D | i915_gem_dmabuf.c | 60 ret = sg_alloc_table(st, obj->pages->nents, GFP_KERNEL); i915_gem_map_dma_buf() 66 for (i = 0; i < obj->pages->nents; i++) { i915_gem_map_dma_buf() 72 if (!dma_map_sg(attachment->dev, st->sgl, st->nents, dir)) { i915_gem_map_dma_buf() 100 dma_unmap_sg(attachment->dev, sg->sgl, sg->nents, dir); i915_gem_unmap_dma_buf() 139 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, 0) i915_gem_dmabuf_vmap()
|
H A D | i915_gem_gtt.c | 557 for_each_sg_page(pages->sgl, &sg_iter, pages->nents, 0) { gen8_ppgtt_insert_entries() 1142 for_each_sg_page(pages->sgl, &sg_iter, pages->nents, 0) { gen6_ppgtt_insert_entries() 1723 obj->pages->sgl, obj->pages->nents, i915_gem_gtt_prepare_object() 1753 for_each_sg_page(st->sgl, &sg_iter, st->nents, 0) { gen8_ggtt_insert_entries() 1799 for_each_sg_page(st->sgl, &sg_iter, st->nents, 0) { gen6_ggtt_insert_entries() 1991 obj->pages->sgl, obj->pages->nents, i915_gem_gtt_finish_object() 2613 st->nents = 0; rotate_pages() 2618 st->nents++; rotate_pages() 2674 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, 0) { intel_rotate_fb_obj_pages()
|
H A D | i915_gem_tiling.c | 515 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, 0) { i915_gem_object_do_bit_17_swizzle() 545 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, 0) { i915_gem_object_save_bit_17_swizzle()
|
H A D | i915_gem.c | 637 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, i915_gem_shmem_pread() 962 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, i915_gem_shmem_pwrite() 1991 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, 0) { i915_gem_object_put_pages_gtt() 2074 st->nents = 0; i915_gem_object_get_pages_gtt() 2097 st->nents++; i915_gem_object_get_pages_gtt() 2106 st->nents++; i915_gem_object_get_pages_gtt() 2133 for_each_sg_page(st->sgl, &sg_iter, st->nents, 0) i915_gem_object_get_pages_gtt()
|
H A D | i915_cmd_parser.c | 839 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, first_page) { vmap_batch()
|
H A D | i915_gem_userptr.c | 715 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, 0) { i915_gem_userptr_put_pages()
|
H A D | i915_drv.h | 2648 for_each_sg_page(obj->pages->sgl, &sg_iter, obj->pages->nents, n) i915_gem_object_get_page()
|
/linux-4.1.27/arch/openrisc/kernel/ |
H A D | dma.c | 180 int nents, enum dma_data_direction dir, or1k_map_sg() 186 for_each_sg(sg, s, nents, i) { for_each_sg() 191 return nents; 196 int nents, enum dma_data_direction dir, or1k_unmap_sg() 202 for_each_sg(sg, s, nents, i) { for_each_sg() 179 or1k_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) or1k_map_sg() argument 195 or1k_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) or1k_unmap_sg() argument
|
/linux-4.1.27/arch/arm/mm/ |
H A D | dma-mapping.c | 889 * @nents: number of buffers to map 901 int arm_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, arm_dma_map_sg() argument 908 for_each_sg(sg, s, nents, i) { for_each_sg() 917 return nents; 929 * @nents: number of buffers to unmap (same as was passed to dma_map_sg) 935 void arm_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, arm_dma_unmap_sg() argument 943 for_each_sg(sg, s, nents, i) arm_dma_unmap_sg() 951 * @nents: number of buffers to map (returned from dma_map_sg) 955 int nents, enum dma_data_direction dir) arm_dma_sync_sg_for_cpu() 961 for_each_sg(sg, s, nents, i) arm_dma_sync_sg_for_cpu() 970 * @nents: number of buffers to map (returned from dma_map_sg) 974 int nents, enum dma_data_direction dir) arm_dma_sync_sg_for_device() 980 for_each_sg(sg, s, nents, i) arm_dma_sync_sg_for_device() 1536 static int __iommu_map_sg(struct device *dev, struct scatterlist *sg, int nents, __iommu_map_sg() argument 1546 for (i = 1; i < nents; i++) { __iommu_map_sg() 1586 * @nents: number of buffers to map 1595 int nents, enum dma_data_direction dir, struct dma_attrs *attrs) arm_coherent_iommu_map_sg() 1597 return __iommu_map_sg(dev, sg, nents, dir, attrs, true); arm_coherent_iommu_map_sg() 1604 * @nents: number of buffers to map 1613 int nents, enum dma_data_direction dir, struct dma_attrs *attrs) arm_iommu_map_sg() 1615 return __iommu_map_sg(dev, sg, nents, dir, attrs, false); arm_iommu_map_sg() 1619 int nents, enum dma_data_direction dir, struct dma_attrs *attrs, __iommu_unmap_sg() 1625 for_each_sg(sg, s, nents, i) { for_each_sg() 1640 * @nents: number of buffers to unmap (same as was passed to dma_map_sg) 1647 int nents, enum dma_data_direction dir, struct dma_attrs *attrs) arm_coherent_iommu_unmap_sg() 1649 __iommu_unmap_sg(dev, sg, nents, dir, attrs, true); arm_coherent_iommu_unmap_sg() 1656 * @nents: number of buffers to unmap (same as was passed to dma_map_sg) 1662 void arm_iommu_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, arm_iommu_unmap_sg() argument 1665 __iommu_unmap_sg(dev, sg, nents, dir, attrs, false); arm_iommu_unmap_sg() 1672 * @nents: number of buffers to map (returned from dma_map_sg) 1676 int nents, enum dma_data_direction dir) arm_iommu_sync_sg_for_cpu() 1681 for_each_sg(sg, s, nents, i) arm_iommu_sync_sg_for_cpu() 1690 * @nents: number of buffers to map (returned from dma_map_sg) 1694 int nents, enum dma_data_direction dir) arm_iommu_sync_sg_for_device() 1699 for_each_sg(sg, s, nents, i) arm_iommu_sync_sg_for_device() 954 arm_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) arm_dma_sync_sg_for_cpu() argument 973 arm_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) arm_dma_sync_sg_for_device() argument 1594 arm_coherent_iommu_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) arm_coherent_iommu_map_sg() argument 1612 arm_iommu_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) arm_iommu_map_sg() argument 1618 __iommu_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs, bool is_coherent) __iommu_unmap_sg() argument 1646 arm_coherent_iommu_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) arm_coherent_iommu_unmap_sg() argument 1675 arm_iommu_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) arm_iommu_sync_sg_for_cpu() argument 1693 arm_iommu_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) arm_iommu_sync_sg_for_device() argument
|
/linux-4.1.27/arch/ia64/hp/common/ |
H A D | sba_iommu.c | 390 * @nents: number of entries in SG list 395 sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents) sba_dump_sg() argument 397 while (nents-- > 0) { sba_dump_sg() 398 printk(KERN_DEBUG " %d : DMA %08lx/%05x CPU %p\n", nents, sba_dump_sg() 406 sba_check_sg( struct ioc *ioc, struct scatterlist *startsg, int nents) sba_check_sg() argument 409 int the_nents = nents; sba_check_sg() 413 sba_dump_sg(NULL, startsg, nents); sba_check_sg() 1221 * @nents: number of entries in startsg list 1231 int nents) sba_fill_pdir() 1238 while (nents-- > 0) { sba_fill_pdir() 1245 nents, startsg->dma_address, cnt, sba_fill_pdir() 1249 nents, startsg->dma_address, cnt, sba_fill_pdir() 1313 * @nents: number of entries in startsg list 1326 int nents) sba_coalesce_chunks() 1337 while (nents > 0) { sba_coalesce_chunks() 1355 while (--nents > 0) { sba_coalesce_chunks() 1448 int nents, enum dma_data_direction dir, 1454 * @nents: number of entries in list 1461 int nents, enum dma_data_direction dir, sba_map_sg_attrs() 1473 DBG_RUN_SG("%s() START %d entries\n", __func__, nents); sba_map_sg_attrs() 1480 for_each_sg(sglist, sg, nents, filled) { for_each_sg() 1488 if (nents == 1) { 1498 sba_dump_sg(ioc, sglist, nents); 1514 coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents); 1516 sba_unmap_sg_attrs(dev, sglist, nents, dir, attrs); 1528 filled = sba_fill_pdir(ioc, sglist, nents); 1534 sba_dump_sg(ioc, sglist, nents); 1550 * @nents: number of entries in list 1557 int nents, enum dma_data_direction dir, sba_unmap_sg_attrs() 1566 __func__, nents, sba_sg_address(sglist), sglist->length); sba_unmap_sg_attrs() 1577 while (nents && sglist->dma_length) { sba_unmap_sg_attrs() 1582 nents--; sba_unmap_sg_attrs() 1585 DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents); sba_unmap_sg_attrs() 1228 sba_fill_pdir( struct ioc *ioc, struct scatterlist *startsg, int nents) sba_fill_pdir() argument 1324 sba_coalesce_chunks(struct ioc *ioc, struct device *dev, struct scatterlist *startsg, int nents) sba_coalesce_chunks() argument 1460 sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) sba_map_sg_attrs() argument 1556 sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) sba_unmap_sg_attrs() argument
|
/linux-4.1.27/arch/xtensa/include/asm/ |
H A D | dma-mapping.h | 55 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 62 for (i = 0; i < nents; i++, sg++ ) { dma_map_sg() 69 return nents; dma_map_sg()
|
/linux-4.1.27/arch/nios2/mm/ |
H A D | dma-mapping.c | 59 int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 66 for_each_sg(sg, sg, nents, i) { for_each_sg() 76 return nents;
|
/linux-4.1.27/arch/blackfin/include/asm/ |
H A D | dma-mapping.h | 99 extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, 140 dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, dma_sync_sg_for_cpu() argument 148 int nents, enum dma_data_direction dir);
|
/linux-4.1.27/drivers/dma/hsu/ |
H A D | hsu.c | 80 count = (desc->nents - desc->active) % HSU_DMA_CHAN_NR_DESC; hsu_dma_chan_start() 183 } else if (desc->active < desc->nents) { hsu_dma_irq() 197 static struct hsu_dma_desc *hsu_dma_alloc_desc(unsigned int nents) hsu_dma_alloc_desc() argument 205 desc->sg = kcalloc(nents, sizeof(*desc->sg), GFP_NOWAIT); hsu_dma_alloc_desc() 241 desc->nents = sg_len; 265 for (i = desc->active; i < desc->nents; i++) hsu_dma_desc_size()
|
H A D | hsu.h | 70 unsigned int nents; member in struct:hsu_dma_desc
|
/linux-4.1.27/net/rds/ |
H A D | message.c | 220 struct scatterlist *rds_message_alloc_sgs(struct rds_message *rm, int nents) rds_message_alloc_sgs() argument 225 WARN_ON(rm->m_used_sgs + nents > rm->m_total_sgs); rds_message_alloc_sgs() 226 WARN_ON(!nents); rds_message_alloc_sgs() 228 if (rm->m_used_sgs + nents > rm->m_total_sgs) rds_message_alloc_sgs() 232 sg_init_table(sg_ret, nents); rds_message_alloc_sgs() 233 rm->m_used_sgs += nents; rds_message_alloc_sgs()
|
H A D | rdma.c | 183 unsigned int nents; __rds_rdma_map() local 245 nents = ret; __rds_rdma_map() 246 sg = kcalloc(nents, sizeof(*sg), GFP_KERNEL); __rds_rdma_map() 251 WARN_ON(!nents); __rds_rdma_map() 252 sg_init_table(sg, nents); __rds_rdma_map() 255 for (i = 0 ; i < nents; i++) __rds_rdma_map() 258 rdsdebug("RDS: trans_private nents is %u\n", nents); __rds_rdma_map() 264 trans_private = rs->rs_transport->get_mr(sg, nents, rs, __rds_rdma_map() 268 for (i = 0 ; i < nents; i++) __rds_rdma_map()
|
H A D | ib_rdma.c | 368 struct scatterlist *sg, unsigned int nents) rds_ib_map_fmr() 379 sg_dma_len = ib_dma_map_sg(dev, sg, nents, rds_ib_map_fmr() 438 ibmr->sg_len = nents; rds_ib_map_fmr() 700 rdsdebug("RDS/IB: free_mr nents %u\n", ibmr->sg_len); rds_ib_free_mr() 743 void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents, rds_ib_get_mr() argument 767 ret = rds_ib_map_fmr(rds_ibdev, ibmr, sg, nents); rds_ib_get_mr() 367 rds_ib_map_fmr(struct rds_ib_device *rds_ibdev, struct rds_ib_mr *ibmr, struct scatterlist *sg, unsigned int nents) rds_ib_map_fmr() argument
|
H A D | iw_rdma.c | 83 struct scatterlist *sg, unsigned int nents); 556 rdsdebug("RDS/IW: free_mr nents %u\n", ibmr->mapping.m_sg.len); rds_iw_free_mr() 591 void *rds_iw_get_mr(struct scatterlist *sg, unsigned long nents, rds_iw_get_mr() argument 625 ret = rds_iw_map_fastreg(rds_iwdev->mr_pool, ibmr, sg, nents); rds_iw_get_mr()
|
H A D | ib.h | 305 void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents,
|
H A D | iw.h | 315 void *rds_iw_get_mr(struct scatterlist *sg, unsigned long nents,
|
H A D | rds.h | 658 struct rds_message *rds_message_alloc(unsigned int nents, gfp_t gfp); 659 struct scatterlist *rds_message_alloc_sgs(struct rds_message *rm, int nents);
|
/linux-4.1.27/drivers/gpu/drm/msm/ |
H A D | msm_iommu.c | 59 for_each_sg(sgt->sgl, sg, sgt->nents, i) { msm_iommu_map() 94 for_each_sg(sgt->sgl, sg, sgt->nents, i) { msm_iommu_unmap()
|
H A D | msm_gem.c | 105 msm_obj->sgt->nents, DMA_BIDIRECTIONAL); get_pages() 121 msm_obj->sgt->nents, DMA_BIDIRECTIONAL); put_pages()
|
/linux-4.1.27/arch/cris/include/asm/ |
H A D | dma-mapping.h | 56 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 60 return nents; dma_map_sg()
|
/linux-4.1.27/drivers/misc/ |
H A D | tifm_core.c | 298 int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, tifm_map_sg() argument 301 return pci_map_sg(to_pci_dev(sock->dev.parent), sg, nents, direction); tifm_map_sg() 305 void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, tifm_unmap_sg() argument 308 pci_unmap_sg(to_pci_dev(sock->dev.parent), sg, nents, direction); tifm_unmap_sg()
|
/linux-4.1.27/drivers/scsi/libfc/ |
H A D | fc_libfc.c | 106 * @nents: pointer to the remaining number of entries in the SG list. 113 u32 *nents, size_t *offset, fc_copy_buffer_to_sglist() 128 if (!(*nents)) fc_copy_buffer_to_sglist() 130 --(*nents); fc_copy_buffer_to_sglist() 111 fc_copy_buffer_to_sglist(void *buf, size_t len, struct scatterlist *sg, u32 *nents, size_t *offset, u32 *crc) fc_copy_buffer_to_sglist() argument
|
H A D | fc_libfc.h | 136 u32 *nents, size_t *offset,
|
H A D | fc_lport.c | 148 * @nents: job->reply_payload.sg_cnt 156 u32 nents; member in struct:fc_bsg_info 1940 fc_copy_buffer_to_sglist(buf, len, info->sg, &info->nents, fc_lport_bsg_resp() 2008 info->nents = job->reply_payload.sg_cnt; fc_lport_els_request() 2069 info->nents = job->reply_payload.sg_cnt; fc_lport_ct_request()
|
H A D | fc_fcp.c | 454 u32 nents; fc_fcp_recv_data() local 492 nents = scsi_sg_count(sc); fc_fcp_recv_data() 495 copy_len = fc_copy_buffer_to_sglist(buf, len, sg, &nents, fc_fcp_recv_data() 499 copy_len = fc_copy_buffer_to_sglist(buf, len, sg, &nents, fc_fcp_recv_data()
|
/linux-4.1.27/drivers/gpu/drm/udl/ |
H A D | udl_dmabuf.c | 65 dma_unmap_sg(attach->dev, sgt->sgl, sgt->nents, udl_detach_dma_buf() 83 int nents, ret; udl_map_dma_buf() local 126 nents = dma_map_sg(attach->dev, sgt->sgl, sgt->orig_nents, dir); udl_map_dma_buf() 127 if (!nents) { udl_map_dma_buf()
|
/linux-4.1.27/arch/sparc/kernel/ |
H A D | ioport.c | 544 * used, at most nents. 550 int nents, enum dma_data_direction dir, pci32_map_sg() 557 for_each_sg(sgl, sg, nents, n) { for_each_sg() 561 return nents; 569 int nents, enum dma_data_direction dir, pci32_unmap_sg() 576 for_each_sg(sgl, sg, nents, n) { for_each_sg() 615 int nents, enum dma_data_direction dir) pci32_sync_sg_for_cpu() 621 for_each_sg(sgl, sg, nents, n) { for_each_sg() 628 int nents, enum dma_data_direction dir) pci32_sync_sg_for_device() 634 for_each_sg(sgl, sg, nents, n) { for_each_sg() 549 pci32_map_sg(struct device *device, struct scatterlist *sgl, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) pci32_map_sg() argument 568 pci32_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) pci32_unmap_sg() argument 614 pci32_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir) pci32_sync_sg_for_cpu() argument 627 pci32_sync_sg_for_device(struct device *device, struct scatterlist *sgl, int nents, enum dma_data_direction dir) pci32_sync_sg_for_device() argument
|
/linux-4.1.27/drivers/gpu/drm/armada/ |
H A D | armada_gem.c | 456 if (dma_map_sg(attach->dev, sgt->sgl, sgt->nents, dir) == 0) { armada_gem_prime_map_dma_buf() 457 num = sgt->nents; armada_gem_prime_map_dma_buf() 467 if (dma_map_sg(attach->dev, sgt->sgl, sgt->nents, dir) == 0) armada_gem_prime_map_dma_buf() 498 dma_unmap_sg(attach->dev, sgt->sgl, sgt->nents, dir); armada_gem_prime_unmap_dma_buf() 502 for_each_sg(sgt->sgl, sg, sgt->nents, i) armada_gem_prime_unmap_dma_buf() 606 if (dobj->sgt->nents > 1) { armada_gem_map_import()
|
/linux-4.1.27/drivers/gpu/drm/tegra/ |
H A D | gem.c | 118 bo->sgt->nents, prot); tegra_bo_iommu_map() 214 for_each_sg(sgt->sgl, s, sgt->nents, i) tegra_bo_get_pages() 217 if (dma_map_sg(drm->dev, sgt->sgl, sgt->nents, DMA_TO_DEVICE) == 0) tegra_bo_get_pages() 352 if (bo->sgt->nents > 1) { tegra_bo_import() 537 if (dma_map_sg(attach->dev, sgt->sgl, sgt->nents, dir) == 0) tegra_gem_prime_map_dma_buf() 563 dma_unmap_sg(attach->dev, sgt->sgl, sgt->nents, dir); tegra_gem_prime_unmap_dma_buf()
|
/linux-4.1.27/drivers/infiniband/hw/cxgb3/ |
H A D | cxio_dbg.c | 139 void cxio_dump_rqt(struct cxio_rdev *rdev, u32 hwtid, int nents) cxio_dump_rqt() argument 142 int size = nents * 64; cxio_dump_rqt()
|
H A D | cxio_hal.h | 207 void cxio_dump_rqt(struct cxio_rdev *rdev, u32 hwtid, int nents);
|
/linux-4.1.27/drivers/dma/ |
H A D | coh901318.h | 124 * @nents: number of entries in sg 136 struct scatterlist *sg, unsigned int nents,
|
H A D | coh901318_lli.c | 233 struct scatterlist *sgl, unsigned int nents, coh901318_lli_fill_sg() 258 for_each_sg(sgl, sg, nents, i) { for_each_sg() 265 } else if (i == nents - 1) for_each_sg() 231 coh901318_lli_fill_sg(struct coh901318_pool *pool, struct coh901318_lli *lli, struct scatterlist *sgl, unsigned int nents, dma_addr_t dev_addr, u32 ctrl_chained, u32 ctrl, u32 ctrl_last, enum dma_transfer_direction dir, u32 ctrl_irq_mask) coh901318_lli_fill_sg() argument
|
/linux-4.1.27/drivers/usb/storage/ |
H A D | protocol.c | 141 unsigned int nents = scsi_sg_count(srb); usb_stor_access_xfer_buf() local 144 nents = sg_nents(sg); usb_stor_access_xfer_buf() 148 sg_miter_start(&miter, sg, nents, dir == FROM_XFER_BUF ? usb_stor_access_xfer_buf()
|
H A D | uas.c | 417 urb->num_sgs = udev->bus->sg_tablesize ? sdb->table.nents : 0; uas_alloc_data_urb()
|
H A D | isd200.c | 469 srb->sdb.table.nents = buff ? 1 : 0; isd200_set_srb()
|
/linux-4.1.27/arch/parisc/include/asm/ |
H A D | dma-mapping.h | 16 int (*map_sg)(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction); 95 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, dma_map_sg() argument 98 return hppa_dma_ops->map_sg(dev, sg, nents, direction); dma_map_sg()
|
/linux-4.1.27/drivers/crypto/ |
H A D | picoxcell_crypto.c | 295 unsigned nents, mapped_ents; spacc_sg_to_ddt() local 300 nents = sg_count(payload, nbytes); spacc_sg_to_ddt() 301 mapped_ents = dma_map_sg(engine->dev, payload, nents, dir); spacc_sg_to_ddt() 317 dma_unmap_sg(engine->dev, payload, nents, dir); spacc_sg_to_ddt() 328 unsigned nents = sg_count(areq->src, areq->cryptlen); spacc_aead_make_ddts() local 350 src_ents = dma_map_sg(engine->dev, areq->src, nents, spacc_aead_make_ddts() 352 dst_ents = dma_map_sg(engine->dev, areq->dst, nents, spacc_aead_make_ddts() 355 src_ents = dma_map_sg(engine->dev, areq->src, nents, spacc_aead_make_ddts() 412 unsigned nents = sg_count(areq->src, areq->cryptlen); spacc_aead_free_ddts() local 415 dma_unmap_sg(engine->dev, areq->src, nents, DMA_TO_DEVICE); spacc_aead_free_ddts() 420 dma_unmap_sg(engine->dev, areq->src, nents, DMA_BIDIRECTIONAL); spacc_aead_free_ddts() 435 unsigned nents = sg_count(payload, nbytes); spacc_free_ddt() local 437 dma_unmap_sg(req->engine->dev, payload, nents, dir); spacc_free_ddt()
|
H A D | img-hash.c | 97 size_t nents; member in struct:img_hash_request_ctx 399 ctx->bufcnt = sg_pcopy_to_buffer(ctx->sgfirst, ctx->nents, img_hash_dma_task() 407 tbc = sg_pcopy_to_buffer(ctx->sgfirst, ctx->nents, img_hash_dma_task() 639 ctx->nents = sg_nents(ctx->sg); img_hash_digest()
|
H A D | mxs-dcp.c | 259 const int nents = sg_nents(req->src); mxs_dcp_aes_block_crypt() local 289 for_each_sg(req->src, src, nents, i) { mxs_dcp_aes_block_crypt() 568 const int nents = sg_nents(req->src); dcp_sha_req_to_buf() local 583 for_each_sg(req->src, src, nents, i) { dcp_sha_req_to_buf()
|
H A D | bfin_crc.c | 122 static struct scatterlist *sg_get(struct scatterlist *sg_list, unsigned int nents, sg_get() argument 128 for_each_sg(sg_list, sg, nents, i) sg_get()
|
H A D | talitos.c | 738 unsigned int nents, enum dma_data_direction dir, talitos_map_sg() 747 dma_map_sg(dev, sg, nents, dir); talitos_map_sg() 748 return nents; talitos_map_sg() 1745 int nents = sg_count(areq->src, nbytes, &chained); ahash_process_req() local 1746 sg_pcopy_to_buffer(areq->src, nents, ahash_process_req() 737 talitos_map_sg(struct device *dev, struct scatterlist *sg, unsigned int nents, enum dma_data_direction dir, bool chained) talitos_map_sg() argument
|
/linux-4.1.27/drivers/media/v4l2-core/ |
H A D | videobuf2-dma-sg.c | 150 if (dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->nents, vb2_dma_sg_alloc() 190 dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->nents, vb2_dma_sg_put() 212 dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); vb2_dma_sg_prepare() 224 dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); vb2_dma_sg_finish() 317 if (dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->nents, vb2_dma_sg_get_userptr() 354 dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir, &attrs); vb2_dma_sg_put_userptr()
|
H A D | videobuf2-dma-contig.c | 77 for_each_sg(sgt->sgl, s, sgt->nents, i) { vb2_dc_get_contiguous_size() 123 dma_sync_sg_for_device(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); vb2_dc_prepare() 135 dma_sync_sg_for_cpu(buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); vb2_dc_finish() 677 sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents, vb2_dc_get_userptr() 679 if (sgt->nents <= 0) { vb2_dc_get_userptr()
|
H A D | videobuf2-vmalloc.c | 246 for_each_sg(sgt->sgl, sg, sgt->nents, i) { vb2_vmalloc_dmabuf_ops_attach()
|
/linux-4.1.27/drivers/hsi/ |
H A D | hsi.c | 532 * @nents: Number of memory entries 535 * nents can be 0. This mainly makes sense for read transfer. 541 struct hsi_msg *hsi_alloc_msg(unsigned int nents, gfp_t flags) hsi_alloc_msg() argument 550 if (!nents) hsi_alloc_msg() 553 err = sg_alloc_table(&msg->sgt, nents, flags); hsi_alloc_msg() 569 * fields set beforehand. If nents > 0 then the client has to initialize
|
/linux-4.1.27/arch/powerpc/platforms/ps3/ |
H A D | system-bus.c | 643 int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ps3_sb_map_sg() 653 for_each_sg(sgl, sg, nents, i) { ps3_sb_map_sg() 666 return nents; ps3_sb_map_sg() 671 int nents, ps3_ioc0_map_sg() 680 int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ps3_sb_unmap_sg() 688 int nents, enum dma_data_direction direction, ps3_ioc0_unmap_sg() 642 ps3_sb_map_sg(struct device *_dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ps3_sb_map_sg() argument 670 ps3_ioc0_map_sg(struct device *_dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ps3_ioc0_map_sg() argument 679 ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ps3_sb_unmap_sg() argument 687 ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ps3_ioc0_unmap_sg() argument
|
/linux-4.1.27/arch/mips/mm/ |
H A D | dma-default.c | 266 int nents, enum dma_data_direction direction, struct dma_attrs *attrs) mips_dma_map_sg() 270 for (i = 0; i < nents; i++, sg++) { mips_dma_map_sg() 281 return nents; mips_dma_map_sg() 265 mips_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) mips_dma_map_sg() argument
|
/linux-4.1.27/drivers/gpu/drm/ |
H A D | drm_cache.c | 112 for_each_sg_page(st->sgl, &sg_iter, st->nents, 0) drm_clflush_sg()
|
H A D | drm_prime.c | 156 dma_unmap_sg(attach->dev, sgt->sgl, sgt->nents, drm_gem_map_detach() 204 if (!dma_map_sg(attach->dev, sgt->sgl, sgt->nents, dir)) { drm_gem_map_dma_buf() 720 for_each_sg(sgt->sgl, sg, sgt->nents, count) { drm_prime_sg_to_page_addr_arrays()
|
H A D | drm_gem_cma_helper.c | 459 if (sgt->nents != 1) drm_gem_cma_prime_import_sg_table()
|
/linux-4.1.27/drivers/media/common/saa7146/ |
H A D | saa7146_core.c | 191 pt->nents = pages; saa7146_vmalloc_build_pgtable() 192 slen = pci_map_sg(pci,pt->slist,pt->nents,PCI_DMA_FROMDEVICE); saa7146_vmalloc_build_pgtable() 202 pci_unmap_sg(pci, pt->slist, pt->nents, PCI_DMA_FROMDEVICE); saa7146_vmalloc_build_pgtable() 216 pci_unmap_sg(pci, pt->slist, pt->nents, PCI_DMA_FROMDEVICE); saa7146_vfree_destroy_pgtable()
|
/linux-4.1.27/arch/frv/include/asm/ |
H A D | dma-mapping.h | 34 extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
/linux-4.1.27/arch/m68k/include/asm/ |
H A D | dma-mapping.h | 96 int nents, enum dma_data_direction dir) dma_sync_sg_for_cpu() 95 dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) dma_sync_sg_for_cpu() argument
|
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/ |
H A D | bcmsdh.c | 886 uint nents; brcmf_sdiod_sgtable_alloc() local 892 nents = max_t(uint, BRCMF_DEFAULT_RXGLOM_SIZE, brcmf_sdiod_txglomsz); brcmf_sdiod_sgtable_alloc() 893 nents += (nents >> 4) + 1; brcmf_sdiod_sgtable_alloc() 895 WARN_ON(nents > sdiodev->max_segment_count); brcmf_sdiod_sgtable_alloc() 897 brcmf_dbg(TRACE, "nents=%d\n", nents); brcmf_sdiod_sgtable_alloc() 898 err = sg_alloc_table(&sdiodev->sgtable, nents, GFP_KERNEL); brcmf_sdiod_sgtable_alloc()
|
/linux-4.1.27/arch/mips/cavium-octeon/ |
H A D | dma-octeon.c | 138 int nents, enum dma_data_direction direction, struct dma_attrs *attrs) octeon_dma_map_sg() 140 int r = swiotlb_map_sg_attrs(dev, sg, nents, direction, attrs); octeon_dma_map_sg() 137 octeon_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) octeon_dma_map_sg() argument
|
/linux-4.1.27/drivers/scsi/ |
H A D | scsi_lib.c | 554 static inline unsigned int scsi_sgtable_index(unsigned short nents) scsi_sgtable_index() argument 558 BUG_ON(nents > SCSI_MAX_SG_SEGMENTS); scsi_sgtable_index() 560 if (nents <= 8) scsi_sgtable_index() 563 index = get_count_order(nents) - 3; scsi_sgtable_index() 568 static void scsi_sg_free(struct scatterlist *sgl, unsigned int nents) scsi_sg_free() argument 572 sgp = scsi_sg_pools + scsi_sgtable_index(nents); scsi_sg_free() 576 static struct scatterlist *scsi_sg_alloc(unsigned int nents, gfp_t gfp_mask) scsi_sg_alloc() argument 580 sgp = scsi_sg_pools + scsi_sgtable_index(nents); scsi_sg_alloc() 591 static int scsi_alloc_sgtable(struct scsi_data_buffer *sdb, int nents, bool mq) scsi_alloc_sgtable() argument 596 BUG_ON(!nents); scsi_alloc_sgtable() 599 if (nents <= SCSI_MAX_SG_SEGMENTS) { scsi_alloc_sgtable() 600 sdb->table.nents = sdb->table.orig_nents = nents; scsi_alloc_sgtable() 601 sg_init_table(sdb->table.sgl, nents); scsi_alloc_sgtable() 607 ret = __sg_alloc_table(&sdb->table, nents, SCSI_MAX_SG_SEGMENTS, scsi_alloc_sgtable() 626 if (cmd->sdb.table.nents) scsi_mq_free_sgtables() 669 if (cmd->sdb.table.nents) scsi_release_buffers() 1098 BUG_ON(count > sdb->table.nents); scsi_init_sgtable() 1099 sdb->table.nents = count; scsi_init_sgtable() 1173 cmd->prot_sdb->table.nents = count; scsi_init_io()
|
H A D | scsi_debug.c | 913 act_len = sg_copy_from_buffer(sdb->table.sgl, sdb->table.nents, fill_from_dev_buffer() 2388 ret = func(sdb->table.sgl, sdb->table.nents, do_device_access() 2395 ret += func(sdb->table.sgl, sdb->table.nents, do_device_access() 3401 sg_miter_start(&miter, sdb->table.sgl, sdb->table.nents, resp_xdwriteread()
|
H A D | iscsi_tcp.c | 518 sdb->table.nents, offset, iscsi_sw_tcp_pdu_init()
|
H A D | libiscsi_tcp.c | 711 sdb->table.nents, iscsi_tcp_hdr_dissect()
|
H A D | scsi_error.c | 946 scmd->sdb.table.nents = scmd->sdb.table.orig_nents = 1; scsi_eh_prep_cmnd()
|
/linux-4.1.27/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_buffer.c | 336 dma_unmap_sg(dev, vmw_tt->sgt.sgl, vmw_tt->sgt.nents, vmw_ttm_unmap_from_dma() 338 vmw_tt->sgt.nents = vmw_tt->sgt.orig_nents; vmw_ttm_unmap_from_dma() 364 vmw_tt->sgt.nents = ret; vmw_ttm_map_for_dma() 420 if (vsgt->num_pages > vmw_tt->sgt.nents) { vmw_ttm_map_dma() 423 vmw_tt->sgt.nents); vmw_ttm_map_dma()
|
/linux-4.1.27/drivers/crypto/ux500/hash/ |
H A D | hash_core.c | 171 ctx->device->dma.sg, ctx->device->dma.nents, hash_set_dma_transfer() 506 * hash_get_nents - Return number of entries (nents) in scatterlist (sg). 515 int nents = 0; hash_get_nents() local 519 nents++; hash_get_nents() 536 return nents; hash_get_nents() 924 /* Store the nents in the dma struct. */ hash_dma_final() 925 ctx->device->dma.nents = hash_get_nents(req->src, req->nbytes, NULL); hash_dma_final() 926 if (!ctx->device->dma.nents) { hash_dma_final() 927 dev_err(device_data->dev, "%s: ctx->device->dma.nents = 0\n", hash_dma_final() 929 ret = ctx->device->dma.nents; hash_dma_final()
|
H A D | hash_alg.h | 307 * @nents: Number of sg entries. 316 int nents; member in struct:hash_dma
|
/linux-4.1.27/drivers/gpu/drm/radeon/ |
H A D | radeon_ttm.c | 534 unsigned pinned = 0, nents; radeon_ttm_tt_pin_userptr() local 575 nents = dma_map_sg(rdev->dev, ttm->sg->sgl, ttm->sg->nents, direction); radeon_ttm_tt_pin_userptr() 576 if (nents != ttm->sg->nents) radeon_ttm_tt_pin_userptr() 607 dma_unmap_sg(rdev->dev, ttm->sg->sgl, ttm->sg->nents, direction); radeon_ttm_tt_unpin_userptr() 609 for_each_sg_page(ttm->sg->sgl, &sg_iter, ttm->sg->nents, 0) { radeon_ttm_tt_unpin_userptr()
|
/linux-4.1.27/drivers/infiniband/ulp/iser/ |
H A D | iser_memory.c | 65 int i = 0, nents = DIV_ROUND_UP(length, PAGE_SIZE); iser_alloc_bounce_sg() local 67 sg = kcalloc(nents, sizeof(*sg), GFP_ATOMIC); iser_alloc_bounce_sg() 71 sg_init_table(sg, nents); iser_alloc_bounce_sg() 87 data->size = nents; iser_alloc_bounce_sg()
|
/linux-4.1.27/drivers/infiniband/ulp/isert/ |
H A D | ib_isert.h | 102 int nents; member in struct:isert_data_buf
|
H A D | ib_isert.c | 1652 struct scatterlist *sg, u32 nents, u32 length, u32 offset, isert_map_data_buf() 1665 data->nents = min_t(unsigned int, nents - data->sg_off, isert_map_data_buf() 1670 data->dma_nents = ib_dma_map_sg(ib_dev, data->sg, data->nents, isert_map_data_buf() 1678 isert_cmd, data->dma_nents, data->sg, data->nents, data->len); isert_map_data_buf() 1688 ib_dma_unmap_sg(ib_dev, data->sg, data->nents, data->dma_dir); isert_unmap_data_buf() 2459 ib_sge = kzalloc(sizeof(struct ib_sge) * data->nents, GFP_KERNEL); isert_map_rdma() 2467 wr->send_wr_num = DIV_ROUND_UP(data->nents, isert_conn->max_sge); isert_map_rdma() 2610 fr_desc, mem->nents, mem->offset); isert_fast_reg_mr() 2612 pagelist_len = isert_map_fr_pagelist(ib_dev, mem->sg, mem->nents, isert_fast_reg_mr() 1651 isert_map_data_buf(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd, struct scatterlist *sg, u32 nents, u32 length, u32 offset, enum iser_ib_op_code op, struct isert_data_buf *data) isert_map_data_buf() argument
|
/linux-4.1.27/arch/nios2/include/asm/ |
H A D | dma-mapping.h | 78 extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
/linux-4.1.27/include/scsi/ |
H A D | scsi_cmnd.h | 173 return cmd->sdb.table.nents; scsi_sg_count() 310 return cmd->prot_sdb ? cmd->prot_sdb->table.nents : 0; scsi_prot_sg_count()
|
/linux-4.1.27/arch/powerpc/platforms/cell/ |
H A D | iommu.c | 619 int nents, enum dma_data_direction direction, dma_fixed_map_sg() 623 return dma_direct_ops.map_sg(dev, sg, nents, direction, attrs); dma_fixed_map_sg() 626 nents, device_to_mask(dev), dma_fixed_map_sg() 631 int nents, enum dma_data_direction direction, dma_fixed_unmap_sg() 635 dma_direct_ops.unmap_sg(dev, sg, nents, direction, attrs); dma_fixed_unmap_sg() 637 ppc_iommu_unmap_sg(cell_get_iommu_table(dev), sg, nents, dma_fixed_unmap_sg() local 618 dma_fixed_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) dma_fixed_map_sg() argument 630 dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) dma_fixed_unmap_sg() argument
|
/linux-4.1.27/include/rdma/ |
H A D | ib_verbs.h | 1453 struct scatterlist *sg, int nents, 1456 struct scatterlist *sg, int nents, 2241 * @nents: The number of scatter/gather entries 2245 struct scatterlist *sg, int nents, ib_dma_map_sg() 2249 return dev->dma_ops->map_sg(dev, sg, nents, direction); ib_dma_map_sg() 2250 return dma_map_sg(dev->dma_device, sg, nents, direction); ib_dma_map_sg() 2257 * @nents: The number of scatter/gather entries 2261 struct scatterlist *sg, int nents, ib_dma_unmap_sg() 2265 dev->dma_ops->unmap_sg(dev, sg, nents, direction); ib_dma_unmap_sg() 2267 dma_unmap_sg(dev->dma_device, sg, nents, direction); ib_dma_unmap_sg() 2271 struct scatterlist *sg, int nents, ib_dma_map_sg_attrs() 2275 return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, attrs); ib_dma_map_sg_attrs() 2279 struct scatterlist *sg, int nents, ib_dma_unmap_sg_attrs() 2283 dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, attrs); ib_dma_unmap_sg_attrs() 2244 ib_dma_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) ib_dma_map_sg() argument 2260 ib_dma_unmap_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) ib_dma_unmap_sg() argument 2270 ib_dma_map_sg_attrs(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ib_dma_map_sg_attrs() argument 2278 ib_dma_unmap_sg_attrs(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, struct dma_attrs *attrs) ib_dma_unmap_sg_attrs() argument
|
/linux-4.1.27/drivers/block/ |
H A D | nvme-core.c | 410 iod->nents = 0; iod_init() 619 if (iod->nents) { req_completion() 620 dma_unmap_sg(&nvmeq->dev->pci_dev->dev, iod->sg, iod->nents, req_completion() 858 iod->nents = blk_rq_map_sg(req->q, req, iod->sg); nvme_queue_rq() 859 if (!iod->nents) nvme_queue_rq() 862 if (!dma_map_sg(nvmeq->q_dmadev, iod->sg, iod->nents, dma_dir)) nvme_queue_rq() 868 iod->nents, dma_dir); nvme_queue_rq() 1677 int i, err, count, nents, offset; nvme_map_user_pages() local 1715 iod->nents = count; nvme_map_user_pages() 1717 nents = dma_map_sg(&dev->pci_dev->dev, sg, count, nvme_map_user_pages() 1719 if (!nents) nvme_map_user_pages() 1739 dma_unmap_sg(&dev->pci_dev->dev, iod->sg, iod->nents, nvme_unmap_user_pages() 1742 for (i = 0; i < iod->nents; i++) nvme_unmap_user_pages()
|
/linux-4.1.27/drivers/hsi/clients/ |
H A D | cmt_speech.c | 480 msg->sgt.nents = 1; cs_hsi_peek_on_control_complete() 510 msg->sgt.nents = 0; cs_hsi_read_on_control() 555 msg->sgt.nents = 1; cs_hsi_write_on_control() 633 msg->sgt.nents = 1; cs_hsi_peek_on_data_complete() 676 rxmsg->sgt.nents = 0; cs_hsi_read_on_data()
|
H A D | ssi_protocol.c | 186 BUG_ON(msg->sgt.nents != (unsigned int)(skb_shinfo(skb)->nr_frags + 1)); ssip_skb_to_msg()
|
/linux-4.1.27/crypto/ |
H A D | algif_skcipher.c | 494 int nents = 0; skcipher_all_sg_nents() local 502 nents += sg_nents(sg); skcipher_all_sg_nents() 504 return nents; skcipher_all_sg_nents()
|
/linux-4.1.27/drivers/media/pci/saa7134/ |
H A D | saa7134-ts.c | 110 return saa7134_pgtable_build(dev->pci, &dmaq->pt, dma->sgl, dma->nents, saa7134_ts_buffer_prepare()
|
H A D | saa7134-vbi.c | 134 return saa7134_pgtable_build(dev->pci, &dmaq->pt, dma->sgl, dma->nents, buffer_prepare()
|
H A D | saa7134-video.c | 898 return saa7134_pgtable_build(dev->pci, &dmaq->pt, dma->sgl, dma->nents, buffer_prepare()
|
/linux-4.1.27/drivers/staging/i2o/ |
H A D | i2o_block.c | 320 int nents; i2o_block_sglist_alloc() local 324 nents = blk_rq_map_sg(ireq->req->q, ireq->req, ireq->sg_table); i2o_block_sglist_alloc() 331 ireq->sg_nents = nents; i2o_block_sglist_alloc() 333 return i2o_dma_map_sg(c, ireq->sg_table, nents, direction, mptr); i2o_block_sglist_alloc()
|
/linux-4.1.27/drivers/staging/lustre/lnet/klnds/o2iblnd/ |
H A D | o2iblnd.h | 915 struct scatterlist *sg, int nents, kiblnd_dma_map_sg() 918 return ib_dma_map_sg(dev, sg, nents, direction); kiblnd_dma_map_sg() 922 struct scatterlist *sg, int nents, kiblnd_dma_unmap_sg() 925 ib_dma_unmap_sg(dev, sg, nents, direction); kiblnd_dma_unmap_sg() 914 kiblnd_dma_map_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) kiblnd_dma_map_sg() argument 921 kiblnd_dma_unmap_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) kiblnd_dma_unmap_sg() argument
|
/linux-4.1.27/drivers/char/agp/ |
H A D | intel-gtt.c | 113 st->sgl, st->nents, PCI_DMA_BIDIRECTIONAL)) intel_gtt_map_memory() 132 st.orig_nents = st.nents = num_sg; intel_gtt_unmap_memory() 853 for_each_sg(st->sgl, sg, st->nents, i) { intel_gtt_insert_sg_entries() 920 mem->num_sg = st.nents; intel_fake_agp_insert_entries()
|
/linux-4.1.27/drivers/hsi/controllers/ |
H A D | omap_ssi_port.c | 227 err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents, ssi_start_dma() 243 err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents, ssi_start_dma() 320 if ((msg->sgt.nents) && (msg->sgt.sgl->length > sizeof(u32))) ssi_start_transfer() 375 if (msg->sgt.nents > 1) ssi_async() 862 if ((!msg->sgt.nents) || (!msg->sgt.sgl->length)) { ssi_pio_complete()
|
H A D | omap_ssi.c | 226 dma_unmap_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents, dir); ssi_gdd_complete()
|
/linux-4.1.27/drivers/usb/core/ |
H A D | message.c | 341 * @nents: how many entries in the scatterlist 361 int nents, size_t length, gfp_t mem_flags) usb_sg_init() 370 || nents <= 0) usb_sg_init() 382 io->entries = nents; usb_sg_init() 416 urb->num_sgs = nents; usb_sg_init() 424 for_each_sg(sg, sg2, nents, j) usb_sg_init() 359 usb_sg_init(struct usb_sg_request *io, struct usb_device *dev, unsigned pipe, unsigned period, struct scatterlist *sg, int nents, size_t length, gfp_t mem_flags) usb_sg_init() argument
|
H A D | usb.c | 879 * @nents: the number of entries in the scatterlist 902 struct scatterlist *sg, int nents) 914 return dma_map_sg(controller, sg, nents,
|
/linux-4.1.27/drivers/block/mtip32xx/ |
H A D | mtip32xx.c | 1752 * @nents Number of scatter list entries. 1759 int nents) fill_command_sg() 1768 for (n = 0; n < nents; n++) { fill_command_sg() 2367 * @nents Number of entries in scatter list for the read command. 2379 struct mtip_cmd *command, int nents, mtip_hw_submit_io() 2389 nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir); mtip_hw_submit_io() 2393 command->scatter_ents = nents; mtip_hw_submit_io() 2423 fill_command_sg(dd, command, nents); mtip_hw_submit_io() 2431 (nents << 16) | 5 | AHCI_CMD_PREFETCH); mtip_hw_submit_io() 3698 unsigned int nents; mtip_submit_request() local 3727 nents = blk_rq_map_sg(hctx->queue, rq, cmd->sg); mtip_submit_request() 3730 mtip_hw_submit_io(dd, rq, cmd, nents, hctx); mtip_submit_request() 1757 fill_command_sg(struct driver_data *dd, struct mtip_cmd *command, int nents) fill_command_sg() argument 2378 mtip_hw_submit_io(struct driver_data *dd, struct request *rq, struct mtip_cmd *command, int nents, struct blk_mq_hw_ctx *hctx) mtip_hw_submit_io() argument
|
/linux-4.1.27/drivers/usb/misc/ |
H A D | usbtest.c | 477 static void free_sglist(struct scatterlist *sg, int nents) free_sglist() argument 483 for (i = 0; i < nents; i++) { free_sglist() 492 alloc_sglist(int nents, int max, int vary, struct usbtest_dev *dev, int pipe) alloc_sglist() argument 504 sg = kmalloc_array(nents, sizeof(*sg), GFP_KERNEL); alloc_sglist() 507 sg_init_table(sg, nents); alloc_sglist() 509 for (i = 0; i < nents; i++) { alloc_sglist() 558 int nents perform_sglist() 572 sg, nents, 0, GFP_KERNEL); perform_sglist()
|
/linux-4.1.27/drivers/usb/wusbcore/ |
H A D | wa-xfer.c | 1025 nents; wa_xfer_create_subset_sg() local 1048 nents = DIV_ROUND_UP((bytes_to_transfer + wa_xfer_create_subset_sg() 1053 out_sg = kmalloc((sizeof(struct scatterlist) * nents), GFP_ATOMIC); wa_xfer_create_subset_sg() 1055 sg_init_table(out_sg, nents); wa_xfer_create_subset_sg() 1062 /* reset nents and calculate the actual number of sg entries wa_xfer_create_subset_sg() 1064 nents = 0; wa_xfer_create_subset_sg() 1084 nents++; wa_xfer_create_subset_sg() 1090 *out_num_sgs = nents; wa_xfer_create_subset_sg()
|
/linux-4.1.27/drivers/crypto/ux500/cryp/ |
H A D | cryp_core.c | 813 int nents = 0; get_nents() local 818 nents++; get_nents() 821 return nents; get_nents() 847 /* We have the device now, so store the nents in the dma struct. */ ablk_dma_crypt()
|
/linux-4.1.27/drivers/mmc/host/ |
H A D | mxcmmc.c | 308 int i, nents; mxcmci_setup_data() local 340 nents = dma_map_sg(host->dma->device->dev, data->sg, mxcmci_setup_data() 342 if (nents != data->sg_len) mxcmci_setup_data()
|
/linux-4.1.27/drivers/media/pci/solo6x10/ |
H A D | solo6x10-v4l2-enc.c | 331 for_each_sg(vbuf->sgl, sg, vbuf->nents, i) { solo_send_desc() 751 sg_copy_from_buffer(vbuf->sgl, vbuf->nents, solo_enc_buf_finish() 755 sg_copy_from_buffer(vbuf->sgl, vbuf->nents, solo_enc_buf_finish()
|
/linux-4.1.27/drivers/infiniband/hw/ehca/ |
H A D | ehca_mrmw.c | 2514 int nents, enum dma_data_direction direction) ehca_dma_map_sg() 2519 for_each_sg(sgl, sg, nents, i) { for_each_sg() 2528 return nents; 2532 int nents, enum dma_data_direction direction) ehca_dma_unmap_sg() 2513 ehca_dma_map_sg(struct ib_device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction direction) ehca_dma_map_sg() argument 2531 ehca_dma_unmap_sg(struct ib_device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) ehca_dma_unmap_sg() argument
|
/linux-4.1.27/drivers/media/pci/ttpci/ |
H A D | budget-core.c | 199 pci_dma_sync_sg_for_cpu(budget->dev->pci, budget->pt.slist, budget->pt.nents, PCI_DMA_FROMDEVICE); vpeirq()
|
H A D | av7110.c | 1286 pci_dma_sync_sg_for_cpu(budget->dev->pci, budget->pt.slist, budget->pt.nents, PCI_DMA_FROMDEVICE); vpeirq()
|
/linux-4.1.27/drivers/crypto/ccp/ |
H A D | ccp-ops.c | 55 unsigned int nents; member in struct:ccp_sg_workarea 484 dma_unmap_sg(wa->dma_dev, wa->dma_sg, wa->nents, wa->dma_dir); ccp_sg_free() 499 wa->nents = sg_nents(sg); ccp_init_sg_workarea() 513 wa->dma_count = dma_map_sg(dev, sg, wa->nents, dma_dir); ccp_init_sg_workarea()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
H A D | base.c | 91 for_each_sg(mem->sg->sgl, sg, mem->sg->nents, i) { nvkm_vm_map_sg_table()
|
/linux-4.1.27/net/ceph/ |
H A D | crypto.c | 134 sgt->nents = sgt->orig_nents = 1; setup_sgtable()
|
/linux-4.1.27/drivers/iommu/ |
H A D | iommu.c | 1137 struct scatterlist *sg, unsigned int nents, int prot) default_iommu_map_sg() 1149 for_each_sg(sg, s, nents, i) { for_each_sg() 1136 default_iommu_map_sg(struct iommu_domain *domain, unsigned long iova, struct scatterlist *sg, unsigned int nents, int prot) default_iommu_map_sg() argument
|
/linux-4.1.27/drivers/media/platform/omap3isp/ |
H A D | ispstat.c | 165 buf->sgt.nents, DMA_FROM_DEVICE); isp_stat_buf_sync_for_device() 175 buf->sgt.nents, DMA_FROM_DEVICE); isp_stat_buf_sync_for_cpu()
|
H A D | ispccdc.c | 452 req->table.sgt.nents, DMA_TO_DEVICE); ccdc_lsc_config() 461 req->table.sgt.nents, DMA_TO_DEVICE); ccdc_lsc_config()
|
/linux-4.1.27/drivers/scsi/cxgbi/ |
H A D | libcxgbi.c | 1719 scsi_in(sc)->table.nents, task_reserve_itt() 1725 scsi_in(sc)->table.nents); task_reserve_itt() 2178 sdb->table.sgl, sdb->table.nents, cxgbi_conn_init_pdu() 2182 sdb->table.nents, tdata->offset, sdb->length); cxgbi_conn_init_pdu() 2189 sdb->table.nents, tdata->offset, tdata->count); cxgbi_conn_init_pdu()
|
/linux-4.1.27/fs/proc/ |
H A D | base.c | 2085 unsigned int nents) proc_pident_lookup() 2100 last = &ents[nents - 1]; proc_pident_lookup() 2118 const struct pid_entry *ents, unsigned int nents) proc_pident_readdir() 2129 if (ctx->pos >= nents + 2) proc_pident_readdir() 2132 for (p = ents + (ctx->pos - 2); p <= ents + nents - 1; p++) { proc_pident_readdir() 2082 proc_pident_lookup(struct inode *dir, struct dentry *dentry, const struct pid_entry *ents, unsigned int nents) proc_pident_lookup() argument 2117 proc_pident_readdir(struct file *file, struct dir_context *ctx, const struct pid_entry *ents, unsigned int nents) proc_pident_readdir() argument
|
/linux-4.1.27/drivers/input/touchscreen/ |
H A D | sur40.c | 423 sgt->sgl, sgt->nents, sur40_video_format.sizeimage, 0); sur40_process_video()
|
/linux-4.1.27/drivers/target/ |
H A D | target_core_transport.c | 2156 static inline void transport_free_sgl(struct scatterlist *sgl, int nents) transport_free_sgl() argument 2161 for_each_sg(sgl, sg, nents, count) transport_free_sgl() 2282 target_alloc_sgl(struct scatterlist **sgl, unsigned int *nents, u32 length, target_alloc_sgl() argument 2309 *nents = nent; target_alloc_sgl()
|
H A D | target_core_sbc.c | 523 * Save the original SGL + nents values before updating to new compare_and_write_callback()
|
/linux-4.1.27/include/media/ |
H A D | saa7146.h | 71 int nents; member in struct:saa7146_pgtable
|
/linux-4.1.27/drivers/xen/ |
H A D | swiotlb-xen.c | 540 * used, at most nents.
|
/linux-4.1.27/drivers/infiniband/ulp/srp/ |
H A D | ib_srp.c | 1512 int len, nents, count; srp_map_data() local 1531 nents = scsi_sg_count(scmnd); srp_map_data() 1537 count = ib_dma_map_sg(ibdev, scat, nents, scmnd->sc_data_direction); srp_map_data()
|
/linux-4.1.27/drivers/char/ |
H A D | virtio_console.c | 616 int nents, size_t in_count, __send_to_port() 630 err = virtqueue_add_outbuf(out_vq, sg, nents, data, GFP_ATOMIC); __send_to_port() 615 __send_to_port(struct port *port, struct scatterlist *sg, int nents, size_t in_count, void *data, bool nonblock) __send_to_port() argument
|
/linux-4.1.27/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe_fcoe.c | 193 e_err(drv, "xid 0x%x w/ non-null sgl=%p nents=%d\n", ixgbe_fcoe_ddp_setup()
|
/linux-4.1.27/drivers/target/loopback/ |
H A D | tcm_loop.c | 151 sgl_bidi_count = sdb->table.nents; tcm_loop_submission_work()
|
/linux-4.1.27/drivers/net/ethernet/intel/i40e/ |
H A D | i40e_fcoe.c | 848 dev_info(&pf->pdev->dev, "xid 0x%x w/ non-null sgl=%p nents=%d\n", i40e_fcoe_ddp_setup()
|
/linux-4.1.27/drivers/media/platform/marvell-ccic/ |
H A D | mcam-core.c | 1208 for_each_sg(sg_table->sgl, sg, sg_table->nents, i) { mcam_vb_sg_buf_prepare()
|