/linux-master/lib/ |
H A D | sg_pool.c | 40 static inline unsigned int sg_pool_index(unsigned short nents) argument 44 BUG_ON(nents > SG_CHUNK_SIZE); 46 if (nents <= 8) 49 index = get_count_order(nents) - 3; 54 static void sg_pool_free(struct scatterlist *sgl, unsigned int nents) argument 58 sgp = sg_pools + sg_pool_index(nents); 62 static struct scatterlist *sg_pool_alloc(unsigned int nents, gfp_t gfp_mask) argument 66 sgp = sg_pools + sg_pool_index(nents); 101 * @nents: Number of entries in sg list 106 * Allocate and chain SGLs in an sg table. If @nents 112 sg_alloc_table_chained(struct sg_table *table, int nents, struct scatterlist *first_chunk, unsigned nents_first_chunk) argument [all...] |
H A D | scatterlist.c | 49 int nents; local 50 for (nents = 0; sg; sg = sg_next(sg)) 51 nents++; 52 return nents; 72 int nents; local 78 for (nents = 0, total = 0; sg; sg = sg_next(sg)) { 79 nents++; 82 return nents; 92 * @nents: Number of entries in the scatterlist 99 * the important bit is that @nents 103 sg_last(struct scatterlist *sgl, unsigned int nents) argument 126 sg_init_table(struct scatterlist *sgl, unsigned int nents) argument 151 sg_kmalloc(unsigned int nents, gfp_t gfp_mask) argument 171 sg_kfree(struct scatterlist *sg, unsigned int nents) argument 285 __sg_alloc_table(struct sg_table *table, unsigned int nents, unsigned int max_ents, struct scatterlist *first_chunk, unsigned int nents_first_chunk, gfp_t gfp_mask, sg_alloc_fn *alloc_fn) argument 374 sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) argument 685 sgl_free_n_order(struct scatterlist *sgl, int nents, int order) argument 725 __sg_page_iter_start(struct sg_page_iter *piter, struct scatterlist *sglist, unsigned int nents, unsigned long pgoffset) argument 800 sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, unsigned int nents, unsigned int flags) argument 962 sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip, bool to_buffer) argument 1008 sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen) argument 1025 sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen) argument 1043 sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip) argument 1061 sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip) argument 1077 sg_zero_buffer(struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip) argument [all...] |
H A D | sg_split.c | 13 int nents; member in struct:sg_splitter 20 static int sg_calculate_split(struct scatterlist *in, int nents, int nb_splits, argument 32 splitters[i].nents = 0; 35 for_each_sg(in, sg, nents, i) { 48 curr->nents++; 59 curr->nents = 1; 86 for (j = 0; j < split->nents; j++, out_sg++) { 112 for (j = 0; j < split->nents; j++, out_sg++) { 168 splitters[i].out_sg = kmalloc_array(splitters[i].nents, 190 out_mapped_nents[i] = splitters[i].nents; [all...] |
H A D | kfifo.c | 296 int nents, unsigned int len) 303 if (!nents) 323 if (++n == nents || sgl == NULL) 335 int nents, unsigned int len, unsigned int off) 350 n = setup_sgl_buf(sgl, fifo->data + off, nents, l); 351 n += setup_sgl_buf(sgl + n, fifo->data, nents - n, len - l); 357 struct scatterlist *sgl, int nents, unsigned int len) 365 return setup_sgl(fifo, sgl, nents, len, fifo->in); 370 struct scatterlist *sgl, int nents, unsigned int len) 378 return setup_sgl(fifo, sgl, nents, le 295 setup_sgl_buf(struct scatterlist *sgl, void *buf, int nents, unsigned int len) argument 334 setup_sgl(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, unsigned int off) argument 356 __kfifo_dma_in_prepare(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len) argument 369 __kfifo_dma_out_prepare(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len) argument 548 __kfifo_dma_in_prepare_r(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) argument 571 __kfifo_dma_out_prepare_r(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, size_t recsize) argument [all...] |
/linux-master/samples/kfifo/ |
H A D | dma-example.c | 25 unsigned int nents; local 63 nents = kfifo_dma_in_prepare(&fifo, sg, ARRAY_SIZE(sg), FIFO_SIZE); 64 printk(KERN_INFO "DMA sgl entries: %d\n", nents); 65 if (!nents) { 73 for (i = 0; i < nents; i++) { 93 nents = kfifo_dma_out_prepare(&fifo, sg, ARRAY_SIZE(sg), 8); 94 printk(KERN_INFO "DMA sgl entries: %d\n", nents); 95 if (!nents) { 102 for (i = 0; i < nents; i++) {
|
/linux-master/drivers/gpu/drm/virtio/ |
H A D | virtgpu_gem.c | 164 struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents) argument 168 objs = kmalloc(struct_size(objs, objs, nents), GFP_KERNEL); 172 objs->nents = 0; 173 objs->total = nents; 183 virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nents) argument 188 objs = virtio_gpu_array_alloc(nents); 192 for (i = 0; i < nents; i++) { 195 objs->nents = i; 200 objs->nents = i; 207 if (WARN_ON_ONCE(objs->nents [all...] |
H A D | virtgpu_object.c | 138 unsigned int *nents) 150 *nents = pages->nents; 152 *nents = pages->orig_nents; 154 *ents = kvmalloc_array(*nents, 188 unsigned int nents; local 205 ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents); 226 ents, nents); 230 virtio_gpu_object_attach(vgdev, bo, ents, nents); 234 virtio_gpu_object_attach(vgdev, bo, ents, nents); 135 virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev, struct virtio_gpu_object *bo, struct virtio_gpu_mem_entry **ents, unsigned int *nents) argument [all...] |
/linux-master/include/linux/ |
H A D | page_reporting.h | 14 struct scatterlist *sg, unsigned int nents);
|
H A D | scatterlist.h | 41 unsigned int nents; /* number of mapped entries */ member in struct:sg_table 210 for_each_sg((sgt)->sgl, sg, (sgt)->nents, i) 410 * @nents: Number of entries in table 414 unsigned int nents) 416 sg_mark_end(&sgl[nents - 1]); 487 void sgl_free_n_order(struct scatterlist *sgl, int nents, int order); 492 size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, 495 size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, 497 size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, 500 size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, 413 sg_init_marker(struct scatterlist *sgl, unsigned int nents) argument [all...] |
H A D | pci-p2pdma.h | 30 unsigned int *nents, u32 length); 71 unsigned int *nents, u32 length) 70 pci_p2pmem_alloc_sgl(struct pci_dev *pdev, unsigned int *nents, u32 length) argument
|
/linux-master/drivers/hwtracing/intel_th/ |
H A D | msu-sink.c | 54 unsigned int nents; local 62 nents = DIV_ROUND_UP(size, PAGE_SIZE); 64 ret = sg_alloc_table(*sgt, nents, GFP_KERNEL); 70 for_each_sg((*sgt)->sgl, sg_ptr, nents, i) { 80 return nents; 90 for_each_sg(sgt->sgl, sg_ptr, sgt->nents, i) {
|
/linux-master/drivers/parisc/ |
H A D | iommu-helpers.h | 8 * @nents: The number of entries in the scatter/gather list. 15 iommu_fill_pdir(struct ioc *ioc, struct scatterlist *startsg, int nents, argument 30 while (nents-- > 0) { 34 DBG_RUN_SG(" %d : %08lx %p/%05x\n", nents, 102 struct scatterlist *startsg, int nents, 114 while (nents > 0) { 131 while(--nents > 0) { 101 iommu_coalesce_chunks(struct ioc *ioc, struct device *dev, struct scatterlist *startsg, int nents, int (*iommu_alloc_range)(struct ioc *, struct device *, size_t)) argument
|
/linux-master/drivers/staging/media/ipu3/ |
H A D | ipu3-dmamap.h | 16 int nents, struct imgu_css_map *map);
|
H A D | ipu3-mmu.h | 35 struct scatterlist *sg, unsigned int nents);
|
/linux-master/kernel/dma/ |
H A D | direct.h | 21 int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, 29 int nents, enum dma_data_direction dir); 32 struct scatterlist *sgl, int nents, enum dma_data_direction dir) 41 int nents, enum dma_data_direction dir, unsigned long attrs); 43 struct scatterlist *sgl, int nents, enum dma_data_direction dir); 46 struct scatterlist *sgl, int nents, enum dma_data_direction dir, 51 struct scatterlist *sgl, int nents, enum dma_data_direction dir) 31 dma_direct_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir) argument 45 dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) argument 50 dma_direct_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir) argument
|
/linux-master/drivers/gpu/drm/i915/ |
H A D | i915_scatterlist.c | 21 if (orig_st->nents == orig_st->orig_nents) 24 if (sg_alloc_table(&new_st, orig_st->nents, GFP_KERNEL | __GFP_NOWARN)) 28 for_each_sg(orig_st->sgl, sg, orig_st->nents, i) { 35 GEM_BUG_ON(new_sg); /* Should walk exactly nents and hit the end */ 113 st->nents = 0; 122 if (st->nents) 130 st->nents++; 199 st->nents = 0; 212 if (st->nents) 220 st->nents [all...] |
/linux-master/drivers/infiniband/hw/usnic/ |
H A D | usnic_uiom.h | 79 int nents; member in struct:usnic_uiom_chunk 80 struct scatterlist page_list[] __counted_by(nents);
|
/linux-master/drivers/crypto/ccree/ |
H A D | cc_buffer_mgr.c | 25 int nents[MAX_NUM_OF_BUFFERS_IN_MLLI]; member in struct:buffer_array 77 unsigned int nents = 0; local 82 nents++; 90 dev_dbg(dev, "nents %d last bytes %d\n", nents, *lbytes); 91 return nents; 109 u32 nents; local 111 nents = sg_nents_for_len(sg, end); 112 sg_copy_buffer(sg, nents, dest, (end - to_skip + 1), to_skip, 236 unsigned int nents, struc 235 cc_add_sg_entry(struct device *dev, struct buffer_array *sgl_data, unsigned int nents, struct scatterlist *sgl, unsigned int data_len, unsigned int data_offset, bool is_last_table, u32 *mlli_nents) argument 255 cc_map_sg(struct device *dev, struct scatterlist *sg, unsigned int nbytes, int direction, u32 *nents, u32 max_sg_nents, u32 *lbytes, u32 *mapped_nents) argument [all...] |
/linux-master/drivers/target/iscsi/cxgbit/ |
H A D | cxgbit_ddp.c | 153 unsigned int nents) 155 unsigned int last_sgidx = nents - 1; 158 for (i = 0; i < nents; i++, sg = sg_next(sg)) { 177 unsigned int sgcnt = ttinfo->nents; 184 xferlen, ttinfo->nents); 246 ttinfo->nents = cmd->se_cmd.t_data_nents; 251 csk, cmd, cmd->se_cmd.data_length, ttinfo->nents); 254 ttinfo->nents = 0; 286 ttinfo->nents, DMA_FROM_DEVICE); 287 ttinfo->nents 152 cxgbit_ddp_sgl_check(struct scatterlist *sg, unsigned int nents) argument [all...] |
/linux-master/drivers/usb/storage/ |
H A D | protocol.c | 128 unsigned int nents = scsi_sg_count(srb); local 131 nents = sg_nents(sg); 135 sg_miter_start(&miter, sg, nents, dir == FROM_XFER_BUF ?
|
/linux-master/drivers/crypto/qce/ |
H A D | dma.c | 78 int nents, unsigned long flags, 85 if (!sg || !nents) 88 desc = dmaengine_prep_slave_sg(chan, sg, nents, dir, flags); 77 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) argument
|
/linux-master/tools/virtio/linux/ |
H A D | scatterlist.h | 150 static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) argument 152 memset(sgl, 0, sizeof(*sgl) * nents); 153 sg_mark_end(&sgl[nents - 1]);
|
/linux-master/drivers/spi/ |
H A D | spi-dw-dma.c | 292 u32 nents; local 294 nents = dw_readl(dws, DW_SPI_TXFLR); 296 delay.value = nents * dws->n_bytes * BITS_PER_BYTE; 340 unsigned int nents) 346 txdesc = dmaengine_prep_slave_sg(dws->txchan, sgl, nents, 377 u32 nents; local 388 nents = dw_readl(dws, DW_SPI_RXFLR); 389 ns = 4U * NSEC_PER_SEC / dws->max_freq * nents; 441 unsigned int nents) 447 rxdesc = dmaengine_prep_slave_sg(dws->rxchan, sgl, nents, 339 dw_spi_dma_submit_tx(struct dw_spi *dws, struct scatterlist *sgl, unsigned int nents) argument 440 dw_spi_dma_submit_rx(struct dw_spi *dws, struct scatterlist *sgl, unsigned int nents) argument 640 unsigned int nents; local [all...] |
/linux-master/net/rds/ |
H A D | ib_mr.h | 120 void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents, 139 unsigned long nents, u32 *key);
|
/linux-master/drivers/mmc/core/ |
H A D | sdio_ops.c | 122 unsigned int nents, left_size, i; local 152 nents = DIV_ROUND_UP(left_size, seg_size); 153 if (nents > 1) { 154 if (sg_alloc_table(&sgtable, nents, GFP_KERNEL)) 158 data.sg_len = nents; 196 if (nents > 1)
|