Home
last modified time | relevance | path

Searched refs:sgl (Results 1 – 25 of 447) sorted by relevance

12345678910>>...18

/kernel/linux/linux-5.10/drivers/misc/genwqe/
Dcard_utils.c291 int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl, in genwqe_alloc_sync_sgl() argument
297 sgl->fpage_offs = offset_in_page((unsigned long)user_addr); in genwqe_alloc_sync_sgl()
298 sgl->fpage_size = min_t(size_t, PAGE_SIZE-sgl->fpage_offs, user_size); in genwqe_alloc_sync_sgl()
299 sgl->nr_pages = DIV_ROUND_UP(sgl->fpage_offs + user_size, PAGE_SIZE); in genwqe_alloc_sync_sgl()
300 sgl->lpage_size = (user_size - sgl->fpage_size) % PAGE_SIZE; in genwqe_alloc_sync_sgl()
303 __func__, user_addr, user_size, sgl->nr_pages, in genwqe_alloc_sync_sgl()
304 sgl->fpage_offs, sgl->fpage_size, sgl->lpage_size); in genwqe_alloc_sync_sgl()
306 sgl->user_addr = user_addr; in genwqe_alloc_sync_sgl()
307 sgl->user_size = user_size; in genwqe_alloc_sync_sgl()
308 sgl->write = write; in genwqe_alloc_sync_sgl()
[all …]
/kernel/linux/linux-5.10/drivers/crypto/hisilicon/
Dsgl.c36 struct hisi_acc_hw_sgl *sgl; member
85 block[i].sgl = dma_alloc_coherent(dev, block_size, in hisi_acc_create_sgl_pool()
88 if (!block[i].sgl) in hisi_acc_create_sgl_pool()
95 block[i].sgl = dma_alloc_coherent(dev, remain_sgl * sgl_size, in hisi_acc_create_sgl_pool()
98 if (!block[i].sgl) in hisi_acc_create_sgl_pool()
114 dma_free_coherent(dev, block_size, block[j].sgl, in hisi_acc_create_sgl_pool()
140 dma_free_coherent(dev, block[i].size, block[i].sgl, in hisi_acc_free_sgl_pool()
161 return (void *)block[block_index].sgl + pool->sgl_size * offset; in acc_get_sgl()
164 static void sg_map_to_hw_sg(struct scatterlist *sgl, in sg_map_to_hw_sg() argument
167 hw_sge->buf = sg_dma_address(sgl); in sg_map_to_hw_sg()
[all …]
/kernel/linux/linux-5.10/lib/
Dscatterlist.c101 struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents) in sg_last() argument
106 for_each_sg(sgl, sg, nents, i) in sg_last()
124 void sg_init_table(struct scatterlist *sgl, unsigned int nents) in sg_init_table() argument
126 memset(sgl, 0, sizeof(*sgl) * nents); in sg_init_table()
127 sg_init_marker(sgl, nents); in sg_init_table()
195 struct scatterlist *sgl, *next; in __sg_free_table() local
198 if (unlikely(!table->sgl)) in __sg_free_table()
201 sgl = table->sgl; in __sg_free_table()
213 next = sg_chain_ptr(&sgl[curr_max_ents - 1]); in __sg_free_table()
225 free_fn(sgl, alloc_size); in __sg_free_table()
[all …]
Dkfifo.c295 static int setup_sgl_buf(struct scatterlist *sgl, void *buf, in setup_sgl_buf() argument
321 sg_set_page(sgl, page, l - off, off); in setup_sgl_buf()
322 sgl = sg_next(sgl); in setup_sgl_buf()
323 if (++n == nents || sgl == NULL) in setup_sgl_buf()
330 sg_set_page(sgl, page, len, off); in setup_sgl_buf()
334 static unsigned int setup_sgl(struct __kfifo *fifo, struct scatterlist *sgl, in setup_sgl() argument
350 n = setup_sgl_buf(sgl, fifo->data + off, nents, l); in setup_sgl()
351 n += setup_sgl_buf(sgl + n, fifo->data, nents - n, len - l); in setup_sgl()
357 struct scatterlist *sgl, int nents, unsigned int len) in __kfifo_dma_in_prepare() argument
365 return setup_sgl(fifo, sgl, nents, len, fifo->in); in __kfifo_dma_in_prepare()
[all …]
/kernel/linux/linux-5.10/mm/
Dpage_reporting.c69 struct scatterlist *sgl, unsigned int nents, bool reported) in page_reporting_drain() argument
71 struct scatterlist *sg = sgl; in page_reporting_drain()
100 sg_init_table(sgl, nents); in page_reporting_drain()
111 struct scatterlist *sgl, unsigned int *offset) in page_reporting_cycle() argument
171 sg_set_page(&sgl[*offset], page, page_len, 0); in page_reporting_cycle()
188 err = prdev->report(prdev, sgl, PAGE_REPORTING_CAPACITY); in page_reporting_cycle()
200 page_reporting_drain(prdev, sgl, PAGE_REPORTING_CAPACITY, !err); in page_reporting_cycle()
224 struct scatterlist *sgl, struct zone *zone) in page_reporting_process_zone() argument
249 sgl, &offset); in page_reporting_process_zone()
258 sgl = &sgl[offset]; in page_reporting_process_zone()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dscatterlist.h43 struct scatterlist *sgl; /* the list */ member
158 for_each_sg((sgt)->sgl, sg, (sgt)->orig_nents, i)
166 for_each_sg((sgt)->sgl, sg, (sgt)->nents, i)
169 struct scatterlist *sgl) in __sg_chain() argument
181 chain_sg->page_link = ((unsigned long) sgl | SG_CHAIN) & ~SG_END; in __sg_chain()
195 struct scatterlist *sgl) in sg_chain() argument
197 __sg_chain(&prv[prv_nents - 1], sgl); in sg_chain()
267 static inline void sg_init_marker(struct scatterlist *sgl, in sg_init_marker() argument
270 sg_mark_end(&sgl[nents - 1]); in sg_init_marker()
309 void sgl_free_n_order(struct scatterlist *sgl, int nents, int order);
[all …]
/kernel/linux/linux-5.10/crypto/
Daf_alg.c404 int af_alg_make_sg(struct af_alg_sgl *sgl, struct iov_iter *iter, int len) in af_alg_make_sg() argument
410 n = iov_iter_get_pages(iter, sgl->pages, len, ALG_MAX_PAGES, &off); in af_alg_make_sg()
418 sg_init_table(sgl->sg, npages + 1); in af_alg_make_sg()
423 sg_set_page(sgl->sg + i, sgl->pages[i], plen, off); in af_alg_make_sg()
428 sg_mark_end(sgl->sg + npages - 1); in af_alg_make_sg()
429 sgl->npages = npages; in af_alg_make_sg()
442 void af_alg_free_sg(struct af_alg_sgl *sgl) in af_alg_free_sg() argument
446 for (i = 0; i < sgl->npages; i++) in af_alg_free_sg()
447 put_page(sgl->pages[i]); in af_alg_free_sg()
501 struct af_alg_tsgl *sgl; in af_alg_alloc_tsgl() local
[all …]
/kernel/linux/linux-5.10/drivers/target/iscsi/cxgbit/
Dcxgbit_ddp.c133 struct scatterlist *sg = ttinfo->sgl; in cxgbit_ddp_set_map()
176 struct scatterlist *sgl = ttinfo->sgl; in cxgbit_ddp_reserve() local
178 unsigned int sg_offset = sgl->offset; in cxgbit_ddp_reserve()
188 if (cxgbit_ddp_sgl_check(sgl, sgcnt) < 0) in cxgbit_ddp_reserve()
191 ttinfo->nr_pages = (xferlen + sgl->offset + in cxgbit_ddp_reserve()
203 sgl->offset = 0; in cxgbit_ddp_reserve()
204 ret = dma_map_sg(&ppm->pdev->dev, sgl, sgcnt, DMA_FROM_DEVICE); in cxgbit_ddp_reserve()
205 sgl->offset = sg_offset; in cxgbit_ddp_reserve()
212 cxgbi_ppm_make_ppod_hdr(ppm, ttinfo->tag, csk->tid, sgl->offset, in cxgbit_ddp_reserve()
218 dma_unmap_sg(&ppm->pdev->dev, sgl, sgcnt, DMA_FROM_DEVICE); in cxgbit_ddp_reserve()
[all …]
/kernel/linux/linux-5.10/tools/virtio/linux/
Dscatterlist.h92 struct scatterlist *sgl) in sg_chain() argument
104 prv[prv_nents - 1].page_link = ((unsigned long) sgl | 0x01) & ~0x02; in sg_chain()
150 static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) in sg_init_table() argument
152 memset(sgl, 0, sizeof(*sgl) * nents); in sg_init_table()
153 sg_mark_end(&sgl[nents - 1]); in sg_init_table()
/kernel/linux/linux-5.10/drivers/scsi/lpfc/
Dlpfc_scsi.c126 struct sli4_sge *sgl = (struct sli4_sge *)lpfc_cmd->dma_sgl; in lpfc_sli4_set_rsp_sgl_last() local
127 if (sgl) { in lpfc_sli4_set_rsp_sgl_last()
128 sgl += 1; in lpfc_sli4_set_rsp_sgl_last()
129 sgl->word2 = le32_to_cpu(sgl->word2); in lpfc_sli4_set_rsp_sgl_last()
130 bf_set(lpfc_sli4_sge_last, sgl, 1); in lpfc_sli4_set_rsp_sgl_last()
131 sgl->word2 = cpu_to_le32(sgl->word2); in lpfc_sli4_set_rsp_sgl_last()
635 struct sli4_sge *sgl; in lpfc_get_scsi_buf_s4() local
687 sgl = (struct sli4_sge *)lpfc_cmd->dma_sgl; in lpfc_get_scsi_buf_s4()
689 sgl->addr_hi = cpu_to_le32(putPaddrHigh(pdma_phys_fcp_cmd)); in lpfc_get_scsi_buf_s4()
690 sgl->addr_lo = cpu_to_le32(putPaddrLow(pdma_phys_fcp_cmd)); in lpfc_get_scsi_buf_s4()
[all …]
Dlpfc_nvme.c973 struct sli4_sge *sgl; in lpfc_nvme_adj_fcp_sgls() local
992 sgl = lpfc_ncmd->dma_sgl; in lpfc_nvme_adj_fcp_sgls()
993 sgl->sge_len = cpu_to_le32(nCmd->cmdlen); in lpfc_nvme_adj_fcp_sgls()
995 sgl->addr_hi = 0; in lpfc_nvme_adj_fcp_sgls()
996 sgl->addr_lo = 0; in lpfc_nvme_adj_fcp_sgls()
1035 sgl->addr_hi = cpu_to_le32(putPaddrHigh(nCmd->cmddma)); in lpfc_nvme_adj_fcp_sgls()
1036 sgl->addr_lo = cpu_to_le32(putPaddrLow(nCmd->cmddma)); in lpfc_nvme_adj_fcp_sgls()
1041 wqe->generic.bde.addrHigh = sgl->addr_hi; in lpfc_nvme_adj_fcp_sgls()
1042 wqe->generic.bde.addrLow = sgl->addr_lo; in lpfc_nvme_adj_fcp_sgls()
1049 sgl++; in lpfc_nvme_adj_fcp_sgls()
[all …]
/kernel/linux/linux-5.10/arch/arm/mm/
Ddma-mapping-nommu.c118 static int arm_nommu_dma_map_sg(struct device *dev, struct scatterlist *sgl, in arm_nommu_dma_map_sg() argument
125 for_each_sg(sgl, sg, nents, i) { in arm_nommu_dma_map_sg()
134 static void arm_nommu_dma_unmap_sg(struct device *dev, struct scatterlist *sgl, in arm_nommu_dma_unmap_sg() argument
141 for_each_sg(sgl, sg, nents, i) in arm_nommu_dma_unmap_sg()
157 static void arm_nommu_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, in arm_nommu_dma_sync_sg_for_device() argument
163 for_each_sg(sgl, sg, nents, i) in arm_nommu_dma_sync_sg_for_device()
167 static void arm_nommu_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, in arm_nommu_dma_sync_sg_for_cpu() argument
173 for_each_sg(sgl, sg, nents, i) in arm_nommu_dma_sync_sg_for_cpu()
/kernel/linux/linux-5.10/kernel/dma/
Ddirect.h20 int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
26 void dma_direct_sync_sg_for_device(struct device *dev, struct scatterlist *sgl,
30 struct scatterlist *sgl, int nents, enum dma_data_direction dir) in dma_direct_sync_sg_for_device() argument
38 void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl,
41 struct scatterlist *sgl, int nents, enum dma_data_direction dir);
44 struct scatterlist *sgl, int nents, enum dma_data_direction dir, in dma_direct_unmap_sg() argument
49 struct scatterlist *sgl, int nents, enum dma_data_direction dir) in dma_direct_sync_sg_for_cpu() argument
Ddirect.c334 struct scatterlist *sgl, int nents, enum dma_data_direction dir) in dma_direct_sync_sg_for_device() argument
339 for_each_sg(sgl, sg, nents, i) { in dma_direct_sync_sg_for_device()
357 struct scatterlist *sgl, int nents, enum dma_data_direction dir) in dma_direct_sync_sg_for_cpu() argument
362 for_each_sg(sgl, sg, nents, i) { in dma_direct_sync_sg_for_cpu()
380 void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl, in dma_direct_unmap_sg() argument
386 for_each_sg(sgl, sg, nents, i) in dma_direct_unmap_sg()
392 int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, in dma_direct_map_sg() argument
398 for_each_sg(sgl, sg, nents, i) { in dma_direct_map_sg()
409 dma_direct_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); in dma_direct_map_sg()
438 sg_set_page(sgt->sgl, page, PAGE_ALIGN(size), 0); in dma_direct_get_sgtable()
/kernel/linux/linux-5.10/drivers/spi/
Dspi-bcm2835.c484 if (bs->tx_buf && !sg_is_last(&tfr->tx_sg.sgl[0])) in bcm2835_spi_transfer_prologue()
485 bs->tx_prologue = sg_dma_len(&tfr->tx_sg.sgl[0]) & 3; in bcm2835_spi_transfer_prologue()
487 if (bs->rx_buf && !sg_is_last(&tfr->rx_sg.sgl[0])) { in bcm2835_spi_transfer_prologue()
488 bs->rx_prologue = sg_dma_len(&tfr->rx_sg.sgl[0]) & 3; in bcm2835_spi_transfer_prologue()
491 if (!bs->tx_buf || sg_is_last(&tfr->tx_sg.sgl[0])) { in bcm2835_spi_transfer_prologue()
496 !(sg_dma_len(&tfr->tx_sg.sgl[0]) & ~3); in bcm2835_spi_transfer_prologue()
518 sg_dma_address(&tfr->rx_sg.sgl[0]), in bcm2835_spi_transfer_prologue()
521 sg_dma_address(&tfr->rx_sg.sgl[0]) += bs->rx_prologue; in bcm2835_spi_transfer_prologue()
522 sg_dma_len(&tfr->rx_sg.sgl[0]) -= bs->rx_prologue; in bcm2835_spi_transfer_prologue()
544 sg_dma_address(&tfr->tx_sg.sgl[0]) += bs->tx_prologue; in bcm2835_spi_transfer_prologue()
[all …]
/kernel/linux/linux-5.10/drivers/media/platform/
Dm2m-deinterlace.c236 ctx->xt->sgl[0].size = s_width; in deinterlace_issue_dma()
237 ctx->xt->sgl[0].icg = s_width; in deinterlace_issue_dma()
243 ctx->xt->sgl[0].size = s_width; in deinterlace_issue_dma()
244 ctx->xt->sgl[0].icg = s_width; in deinterlace_issue_dma()
250 ctx->xt->sgl[0].size = s_width / 2; in deinterlace_issue_dma()
251 ctx->xt->sgl[0].icg = s_width / 2; in deinterlace_issue_dma()
257 ctx->xt->sgl[0].size = s_width / 2; in deinterlace_issue_dma()
258 ctx->xt->sgl[0].icg = s_width / 2; in deinterlace_issue_dma()
264 ctx->xt->sgl[0].size = s_width / 2; in deinterlace_issue_dma()
265 ctx->xt->sgl[0].icg = s_width / 2; in deinterlace_issue_dma()
[all …]
/kernel/linux/linux-5.10/drivers/media/platform/rockchip/rga/
Drga-buf.c118 struct scatterlist *sgl; in rga_buf_map() local
131 for_each_sg(sgt->sgl, sgl, sgt->nents, i) { in rga_buf_map()
132 len = sg_dma_len(sgl) >> PAGE_SHIFT; in rga_buf_map()
133 address = sg_phys(sgl); in rga_buf_map()
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/
Di915_scatterlist.h27 } __sgt_iter(struct scatterlist *sgl, bool dma) { in __sgt_iter() argument
28 struct sgt_iter s = { .sgp = sgl }; in __sgt_iter()
77 for ((__iter) = __sgt_iter((__sgt)->sgl, true); \
89 for ((__iter) = __sgt_iter((__sgt)->sgl, false); \
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/ixgbe/
Dixgbe_fcoe.c29 ddp->sgl = NULL; in ixgbe_fcoe_clear_ddp()
110 if (ddp->sgl) in ixgbe_fcoe_ddp_put()
111 dma_unmap_sg(&adapter->pdev->dev, ddp->sgl, ddp->sgc, in ixgbe_fcoe_ddp_put()
134 struct scatterlist *sgl, unsigned int sgc, in ixgbe_fcoe_ddp_setup() argument
153 if (!netdev || !sgl) in ixgbe_fcoe_ddp_setup()
169 if (ddp->sgl) { in ixgbe_fcoe_ddp_setup()
171 xid, ddp->sgl, ddp->sgc); in ixgbe_fcoe_ddp_setup()
189 dmacount = dma_map_sg(&adapter->pdev->dev, sgl, sgc, DMA_FROM_DEVICE); in ixgbe_fcoe_ddp_setup()
202 ddp->sgl = sgl; in ixgbe_fcoe_ddp_setup()
206 for_each_sg(sgl, sg, dmacount, i) { in ixgbe_fcoe_ddp_setup()
[all …]
/kernel/linux/linux-5.10/drivers/scsi/esas2r/
Desas2r_io.c224 struct esas2r_mem_desc *sgl; in esas2r_build_sg_list_sge() local
231 sgl = esas2r_alloc_sgl(a); in esas2r_build_sg_list_sge()
233 if (unlikely(sgl == NULL)) in esas2r_build_sg_list_sge()
244 memcpy(sgl->virt_addr, sgc->sge.a64.last, sgelen); in esas2r_build_sg_list_sge()
248 (struct atto_vda_sge *)((u8 *)sgl->virt_addr + in esas2r_build_sg_list_sge()
253 (struct atto_vda_sge *)((u8 *)sgl->virt_addr in esas2r_build_sg_list_sge()
260 cpu_to_le64(sgl->phys_addr); in esas2r_build_sg_list_sge()
302 list_add(&sgl->next_desc, &rq->sg_table_head); in esas2r_build_sg_list_sge()
376 struct esas2r_mem_desc *sgl; in esas2r_build_prd_iblk() local
449 sgl = esas2r_alloc_sgl(a); in esas2r_build_prd_iblk()
[all …]
/kernel/linux/linux-5.10/drivers/xen/
Dswiotlb-xen.c490 xen_swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sgl, int nelems, in xen_swiotlb_unmap_sg() argument
498 for_each_sg(sgl, sg, nelems, i) in xen_swiotlb_unmap_sg()
505 xen_swiotlb_map_sg(struct device *dev, struct scatterlist *sgl, int nelems, in xen_swiotlb_map_sg() argument
513 for_each_sg(sgl, sg, nelems, i) { in xen_swiotlb_map_sg()
523 xen_swiotlb_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); in xen_swiotlb_map_sg()
524 sg_dma_len(sgl) = 0; in xen_swiotlb_map_sg()
529 xen_swiotlb_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, in xen_swiotlb_sync_sg_for_cpu() argument
535 for_each_sg(sgl, sg, nelems, i) { in xen_swiotlb_sync_sg_for_cpu()
542 xen_swiotlb_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, in xen_swiotlb_sync_sg_for_device() argument
548 for_each_sg(sgl, sg, nelems, i) { in xen_swiotlb_sync_sg_for_device()
/kernel/linux/linux-5.10/drivers/scsi/qedf/
Ddrv_scsi_fw_funcs.c34 val = cpu_to_le32(sgl_task_params->sgl[sge_index].sge_addr.lo); in init_scsi_sgl_context()
36 val = cpu_to_le32(sgl_task_params->sgl[sge_index].sge_addr.hi); in init_scsi_sgl_context()
38 val = cpu_to_le32(sgl_task_params->sgl[sge_index].sge_len); in init_scsi_sgl_context()
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gem/
Di915_gem_phys.c51 sg = st->sgl; in i915_gem_object_get_pages_phys()
96 dma_addr_t dma = sg_dma_address(pages->sgl); in i915_gem_object_put_pages_phys()
97 void *vaddr = sg_page(pages->sgl); in i915_gem_object_put_pages_phys()
141 void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset; in phys_pwrite()
172 void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset; in phys_pread()
262 unsigned int sg_page_sizes = i915_sg_page_sizes(pages->sgl); in i915_gem_object_attach_phys()
/kernel/linux/linux-5.10/drivers/dma/
Dmilbeaut-hdmac.c61 struct scatterlist *sgl; member
122 sg = &md->sgl[md->sg_cur]; in milbeaut_chan_start()
256 milbeaut_hdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, in milbeaut_hdmac_prep_slave_sg() argument
272 md->sgl = kzalloc(sizeof(*sgl) * sg_len, GFP_NOWAIT); in milbeaut_hdmac_prep_slave_sg()
273 if (!md->sgl) { in milbeaut_hdmac_prep_slave_sg()
279 md->sgl[i] = sgl[i]; in milbeaut_hdmac_prep_slave_sg()
350 sg = &md->sgl[md->sg_cur]; in milbeaut_hdmac_tx_status()
372 txstate->residue += sg_dma_len(&md->sgl[i]); in milbeaut_hdmac_tx_status()
398 kfree(md->sgl); in milbeaut_hdmac_desc_free()
/kernel/linux/linux-5.10/drivers/gpu/drm/omapdrm/
Domap_gem_dmabuf.c42 sg_init_table(sg->sgl, 1); in omap_gem_map_dma_buf()
43 sg_dma_len(sg->sgl) = obj->size; in omap_gem_map_dma_buf()
44 sg_set_page(sg->sgl, pfn_to_page(PFN_DOWN(dma_addr)), obj->size, 0); in omap_gem_map_dma_buf()
45 sg_dma_address(sg->sgl) = dma_addr; in omap_gem_map_dma_buf()

12345678910>>...18