/linux/drivers/media/v4l2-core/ |
A D | videobuf-dma-sg.c | 69 sglist = vzalloc(array_size(nr_pages, sizeof(*sglist))); in videobuf_vmalloc_to_sg() 70 if (NULL == sglist) in videobuf_vmalloc_to_sg() 80 return sglist; in videobuf_vmalloc_to_sg() 83 vfree(sglist); in videobuf_vmalloc_to_sg() 100 sglist = vmalloc(array_size(nr_pages, sizeof(*sglist))); in videobuf_pages_to_sg() 101 if (NULL == sglist) in videobuf_pages_to_sg() 119 return sglist; in videobuf_pages_to_sg() 123 vfree(sglist); in videobuf_pages_to_sg() 128 vfree(sglist); in videobuf_pages_to_sg() 299 dma->sglist = vmalloc(sizeof(*dma->sglist)); in videobuf_dma_map() [all …]
|
/linux/drivers/misc/bcm-vk/ |
A D | bcm_vk_sg.c | 91 dma->sglist = dma_alloc_coherent(dev, in bcm_vk_dma_alloc() 95 if (!dma->sglist) in bcm_vk_dma_alloc() 98 dma->sglist[SGLIST_NUM_SG] = 0; in bcm_vk_dma_alloc() 99 dma->sglist[SGLIST_TOTALSIZE] = vkdata->size; in bcm_vk_dma_alloc() 142 dma->sglist[SGLIST_NUM_SG]++; in bcm_vk_dma_alloc() 153 dma->sglist[SGLIST_NUM_SG]++; in bcm_vk_dma_alloc() 163 (u64)dma->sglist, in bcm_vk_dma_alloc() 220 if (dma[i].sglist) in bcm_vk_sg_alloc() 237 num_sg = dma->sglist[SGLIST_NUM_SG]; in bcm_vk_dma_free() 255 dma->sglist = NULL; in bcm_vk_dma_free() [all …]
|
/linux/drivers/firmware/efi/ |
A D | capsule.c | 246 efi_capsule_block_desc_t *sglist; in efi_capsule_update() local 248 sglist = kmap_atomic(sg_pages[i]); in efi_capsule_update() 254 sglist[j].length = sz; in efi_capsule_update() 255 sglist[j].data = *pages++; in efi_capsule_update() 262 sglist[j].length = 0; in efi_capsule_update() 265 sglist[j].data = 0; in efi_capsule_update() 267 sglist[j].data = page_to_phys(sg_pages[i + 1]); in efi_capsule_update() 278 efi_capsule_flush_cache_range(sglist, PAGE_SIZE); in efi_capsule_update() 280 kunmap_atomic(sglist); in efi_capsule_update()
|
/linux/drivers/media/pci/cx23885/ |
A D | cx23885-alsa.c | 90 buf->sglist = vzalloc(array_size(sizeof(*buf->sglist), buf->nr_pages)); in cx23885_alsa_dma_init() 91 if (NULL == buf->sglist) in cx23885_alsa_dma_init() 94 sg_init_table(buf->sglist, buf->nr_pages); in cx23885_alsa_dma_init() 99 sg_set_page(&buf->sglist[i], pg, PAGE_SIZE, 0); in cx23885_alsa_dma_init() 104 vfree(buf->sglist); in cx23885_alsa_dma_init() 105 buf->sglist = NULL; in cx23885_alsa_dma_init() 116 buf->sglen = dma_map_sg(&dev->pci->dev, buf->sglist, in cx23885_alsa_dma_map() 133 dma_unmap_sg(&dev->pci->dev, buf->sglist, buf->nr_pages, DMA_FROM_DEVICE); in cx23885_alsa_dma_unmap() 140 vfree(buf->sglist); in cx23885_alsa_dma_free() 141 buf->sglist = NULL; in cx23885_alsa_dma_free() [all …]
|
/linux/drivers/media/pci/cx25821/ |
A D | cx25821-alsa.c | 55 struct scatterlist *sglist; member 153 buf->sglist = vzalloc(array_size(sizeof(*buf->sglist), buf->nr_pages)); in cx25821_alsa_dma_init() 154 if (NULL == buf->sglist) in cx25821_alsa_dma_init() 157 sg_init_table(buf->sglist, buf->nr_pages); in cx25821_alsa_dma_init() 162 sg_set_page(&buf->sglist[i], pg, PAGE_SIZE, 0); in cx25821_alsa_dma_init() 167 vfree(buf->sglist); in cx25821_alsa_dma_init() 168 buf->sglist = NULL; in cx25821_alsa_dma_init() 179 buf->sglen = dma_map_sg(&dev->pci->dev, buf->sglist, in cx25821_alsa_dma_map() 203 vfree(buf->sglist); in cx25821_alsa_dma_free() 204 buf->sglist = NULL; in cx25821_alsa_dma_free() [all …]
|
A D | cx25821-core.c | 995 static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist, in cx25821_risc_field() argument 1014 sg = sglist; in cx25821_risc_field() 1058 struct scatterlist *sglist, unsigned int top_offset, in cx25821_risc_buffer() argument 1090 rp = cx25821_risc_field(rp, sglist, top_offset, 0, bpl, padding, in cx25821_risc_buffer() 1095 rp = cx25821_risc_field(rp, sglist, bottom_offset, 0x200, bpl, in cx25821_risc_buffer() 1106 static __le32 *cx25821_risc_field_audio(__le32 * rp, struct scatterlist *sglist, in cx25821_risc_field_audio() argument 1119 sg = sglist; in cx25821_risc_field_audio() 1169 struct scatterlist *sglist, in cx25821_risc_databuffer_audio() argument 1191 rp = cx25821_risc_field_audio(rp, sglist, 0, NO_SYNC_LINE, bpl, 0, in cx25821_risc_databuffer_audio()
|
/linux/drivers/parisc/ |
A D | ccio-dma.c | 927 sg_dma_address(sglist) = ccio_map_single(dev, in ccio_map_sg() 928 sg_virt(sglist), sglist->length, in ccio_map_sg() 930 sg_dma_len(sglist) = sglist->length; in ccio_map_sg() 935 prev_len += sglist[i].length; in ccio_map_sg() 970 current_len += sg_dma_len(sglist + i); in ccio_map_sg() 1000 __func__, nents, sg_virt(sglist), sglist->length); in ccio_unmap_sg() 1006 while(sg_dma_len(sglist) && nents--) { in ccio_unmap_sg() 1009 ioc->usg_pages += sg_dma_len(sglist) >> PAGE_SHIFT; in ccio_unmap_sg() 1011 ccio_unmap_page(dev, sg_dma_address(sglist), in ccio_unmap_sg() 1012 sg_dma_len(sglist), direction, 0); in ccio_unmap_sg() [all …]
|
A D | sba_iommu.c | 954 sg_dma_address(sglist) = sba_map_single(dev, sg_virt(sglist), in sba_map_sg() 955 sglist->length, direction); in sba_map_sg() 956 sg_dma_len(sglist) = sglist->length; in sba_map_sg() 965 sba_dump_sg(ioc, sglist, nents); in sba_map_sg() 992 filled = iommu_fill_pdir(ioc, sglist, nents, 0, sba_io_pdir_entry); in sba_map_sg() 1000 sba_dump_sg(ioc, sglist, nents); in sba_map_sg() 1032 __func__, nents, sg_virt(sglist), sglist->length); in sba_unmap_sg() 1050 while (sg_dma_len(sglist) && nents--) { in sba_unmap_sg() 1052 sba_unmap_page(dev, sg_dma_address(sglist), sg_dma_len(sglist), in sba_unmap_sg() 1055 …ioc->usg_pages += ((sg_dma_address(sglist) & ~IOVP_MASK) + sg_dma_len(sglist) + IOVP_SIZE - 1) >> … in sba_unmap_sg() [all …]
|
/linux/drivers/media/pci/bt8xx/ |
A D | bttv-risc.c | 36 struct scatterlist *sglist, in bttv_risc_packed() argument 68 sg = sglist; in bttv_risc_packed() 115 struct scatterlist *sglist, in bttv_risc_planar() argument 146 ysg = sglist; in bttv_risc_planar() 147 usg = sglist; in bttv_risc_planar() 148 vsg = sglist; in bttv_risc_planar() 716 bttv_risc_packed(btv,&buf->top,dma->sglist, in bttv_buffer_risc() 789 dma->sglist, in bttv_buffer_risc() 796 dma->sglist, in bttv_buffer_risc() 812 dma->sglist, in bttv_buffer_risc() [all …]
|
/linux/drivers/media/pci/tw68/ |
A D | tw68-risc.c | 33 static __le32 *tw68_risc_field(__le32 *rp, struct scatterlist *sglist, in tw68_risc_field() argument 54 sg = sglist; in tw68_risc_field() 130 struct scatterlist *sglist, in tw68_risc_buffer() argument 162 rp = tw68_risc_field(rp, sglist, top_offset, 1, in tw68_risc_buffer() 165 rp = tw68_risc_field(rp, sglist, bottom_offset, 2, in tw68_risc_buffer()
|
/linux/include/linux/ |
A D | scatterlist.h | 151 #define for_each_sg(sglist, sg, nr, __i) \ argument 152 for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg)) 428 struct scatterlist *sglist, unsigned int nents, 461 #define for_each_sg_page(sglist, piter, nents, pgoffset) \ argument 462 for (__sg_page_iter_start((piter), (sglist), (nents), (pgoffset)); \ 476 #define for_each_sg_dma_page(sglist, dma_iter, dma_nents, pgoffset) \ argument 477 for (__sg_page_iter_start(&(dma_iter)->base, sglist, dma_nents, \
|
/linux/drivers/media/pci/cx88/ |
A D | cx88-alsa.c | 48 struct scatterlist *sglist; member 292 buf->sglist = vzalloc(array_size(sizeof(*buf->sglist), buf->nr_pages)); in cx88_alsa_dma_init() 293 if (!buf->sglist) in cx88_alsa_dma_init() 296 sg_init_table(buf->sglist, buf->nr_pages); in cx88_alsa_dma_init() 301 sg_set_page(&buf->sglist[i], pg, PAGE_SIZE, 0); in cx88_alsa_dma_init() 306 vfree(buf->sglist); in cx88_alsa_dma_init() 307 buf->sglist = NULL; in cx88_alsa_dma_init() 318 buf->sglen = dma_map_sg(&dev->pci->dev, buf->sglist, in cx88_alsa_dma_map() 335 dma_unmap_sg(&dev->pci->dev, buf->sglist, buf->nr_pages, in cx88_alsa_dma_unmap() 343 vfree(buf->sglist); in cx88_alsa_dma_free() [all …]
|
A D | cx88-core.c | 70 static __le32 *cx88_risc_field(__le32 *rp, struct scatterlist *sglist, in cx88_risc_field() argument 88 sg = sglist; in cx88_risc_field() 131 struct scatterlist *sglist, in cx88_risc_buffer() argument 163 rp = cx88_risc_field(rp, sglist, top_offset, 0, in cx88_risc_buffer() 166 rp = cx88_risc_field(rp, sglist, bottom_offset, 0x200, in cx88_risc_buffer() 178 struct scatterlist *sglist, unsigned int bpl, in cx88_risc_databuffer() argument 201 rp = cx88_risc_field(rp, sglist, 0, NO_SYNC_LINE, bpl, 0, in cx88_risc_databuffer()
|
/linux/arch/ia64/hp/common/ |
A D | sba_iommu.c | 1449 for_each_sg(sglist, sg, nents, filled) { in sba_map_sg_attrs() 1458 sglist->dma_length = sglist->length; in sba_map_sg_attrs() 1459 sglist->dma_address = sba_map_page(dev, sg_page(sglist), in sba_map_sg_attrs() 1460 sglist->offset, sglist->length, dir, attrs); in sba_map_sg_attrs() 1470 sba_dump_sg(ioc, sglist, nents); in sba_map_sg_attrs() 1500 filled = sba_fill_pdir(ioc, sglist, nents); in sba_map_sg_attrs() 1506 sba_dump_sg(ioc, sglist, nents); in sba_map_sg_attrs() 1538 __func__, nents, sba_sg_address(sglist), sglist->length); in sba_unmap_sg_attrs() 1549 while (nents && sglist->dma_length) { in sba_unmap_sg_attrs() 1551 sba_unmap_page(dev, sglist->dma_address, sglist->dma_length, in sba_unmap_sg_attrs() [all …]
|
/linux/block/ |
A D | blk-merge.c | 428 struct scatterlist *sglist) in blk_next_sg() argument 431 return sglist; in blk_next_sg() 445 struct bio_vec *bvec, struct scatterlist *sglist, in blk_bvec_map_sg() argument 468 *sg = blk_next_sg(sg, sglist); in blk_bvec_map_sg() 480 struct scatterlist *sglist, struct scatterlist **sg) in __blk_bvec_map_sg() argument 482 *sg = blk_next_sg(sg, sglist); in __blk_bvec_map_sg() 510 struct scatterlist *sglist, in __blk_bios_map_sg() argument 530 nsegs += __blk_bvec_map_sg(bvec, sglist, sg); in __blk_bios_map_sg() 532 nsegs += blk_bvec_map_sg(q, &bvec, sglist, sg); in __blk_bios_map_sg() 550 struct scatterlist *sglist, struct scatterlist **last_sg) in __blk_rq_map_sg() argument [all …]
|
/linux/arch/sparc/kernel/ |
A D | iommu.c | 432 static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist, in dma_4u_map_sg() argument 466 outs = s = segstart = &sglist[0]; in dma_4u_map_sg() 477 for_each_sg(sglist, s, nelems, i) { in dma_4u_map_sg() 555 for_each_sg(sglist, s, nelems, i) { in dma_4u_map_sg() 605 static void dma_4u_unmap_sg(struct device *dev, struct scatterlist *sglist, in dma_4u_unmap_sg() argument 619 ctx = fetch_sg_ctx(iommu, sglist); in dma_4u_unmap_sg() 623 sg = sglist; in dma_4u_unmap_sg() 696 struct scatterlist *sglist, int nelems, in dma_4u_sync_sg_for_cpu() argument 720 iopte = iommu->page_table + ((sglist[0].dma_address - in dma_4u_sync_sg_for_cpu() 726 bus_addr = sglist[0].dma_address & IO_PAGE_MASK; in dma_4u_sync_sg_for_cpu() [all …]
|
/linux/arch/powerpc/kernel/ |
A D | dma-iommu.c | 118 static int dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist, in dma_iommu_map_sg() argument 122 return ppc_iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems, in dma_iommu_map_sg() 126 static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist, in dma_iommu_unmap_sg() argument 130 ppc_iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems, in dma_iommu_unmap_sg()
|
/linux/drivers/media/common/saa7146/ |
A D | saa7146_core.c | 139 struct scatterlist *sglist; in vmalloc_to_sg() local 143 sglist = kmalloc_array(nr_pages, sizeof(struct scatterlist), GFP_KERNEL); in vmalloc_to_sg() 144 if (NULL == sglist) in vmalloc_to_sg() 146 sg_init_table(sglist, nr_pages); in vmalloc_to_sg() 152 sg_set_page(&sglist[i], pg, PAGE_SIZE, 0); in vmalloc_to_sg() 154 return sglist; in vmalloc_to_sg() 157 kfree(sglist); in vmalloc_to_sg()
|
/linux/drivers/media/pci/saa7134/ |
A D | saa7134-alsa.c | 274 dma->sglist = vzalloc(array_size(sizeof(*dma->sglist), dma->nr_pages)); in saa7134_alsa_dma_init() 275 if (NULL == dma->sglist) in saa7134_alsa_dma_init() 278 sg_init_table(dma->sglist, dma->nr_pages); in saa7134_alsa_dma_init() 283 sg_set_page(&dma->sglist[i], pg, PAGE_SIZE, 0); in saa7134_alsa_dma_init() 288 vfree(dma->sglist); in saa7134_alsa_dma_init() 289 dma->sglist = NULL; in saa7134_alsa_dma_init() 300 dma->sglen = dma_map_sg(&dev->pci->dev, dma->sglist, in saa7134_alsa_dma_map() 317 dma_unmap_sg(&dev->pci->dev, dma->sglist, dma->nr_pages, DMA_FROM_DEVICE); in saa7134_alsa_dma_unmap() 324 vfree(dma->sglist); in saa7134_alsa_dma_free() 325 dma->sglist = NULL; in saa7134_alsa_dma_free() [all …]
|
/linux/drivers/scsi/ |
A D | pmcraid.c | 3195 sgl_free_order(sglist->scatterlist, sglist->order); in pmcraid_free_sglist() 3196 kfree(sglist); in pmcraid_free_sglist() 3220 if (sglist == NULL) in pmcraid_alloc_sglist() 3223 sglist->order = order; in pmcraid_alloc_sglist() 3227 return sglist; in pmcraid_alloc_sglist() 3484 if (!sglist) { in pmcraid_build_passthrough_ioadls() 3493 if (!sglist->num_dma_sg || sglist->num_dma_sg > PMCRAID_MAX_IOADLS) { in pmcraid_build_passthrough_ioadls() 3500 cmd->sglist = sglist; in pmcraid_build_passthrough_ioadls() 3506 for_each_sg(sglist->scatterlist, sg, sglist->num_dma_sg, i) { in pmcraid_build_passthrough_ioadls() 3535 struct pmcraid_sglist *sglist = cmd->sglist; in pmcraid_release_passthrough_ioadls() local [all …]
|
/linux/tools/virtio/linux/ |
A D | scatterlist.h | 77 #define for_each_sg(sglist, sg, nr, __i) \ argument 78 for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
|
/linux/drivers/staging/media/ipu3/ |
A D | ipu3-dmamap.c | 184 int imgu_dmamap_map_sg(struct imgu_device *imgu, struct scatterlist *sglist, in imgu_dmamap_map_sg() argument 193 for_each_sg(sglist, sg, nents, i) { in imgu_dmamap_map_sg() 216 sglist, nents) < size) in imgu_dmamap_map_sg()
|
/linux/net/rds/ |
A D | ib.h | 326 struct scatterlist *sglist, in rds_ib_dma_sync_sg_for_cpu() argument 333 for_each_sg(sglist, sg, sg_dma_len, i) { in rds_ib_dma_sync_sg_for_cpu() 341 struct scatterlist *sglist, in rds_ib_dma_sync_sg_for_device() argument 348 for_each_sg(sglist, sg, sg_dma_len, i) { in rds_ib_dma_sync_sg_for_device()
|
/linux/kernel/dma/ |
A D | debug.h | 24 extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, 77 struct scatterlist *sglist, in debug_dma_unmap_sg() argument
|
/linux/arch/mips/jazz/ |
A D | jazzdma.c | 543 static int jazz_dma_map_sg(struct device *dev, struct scatterlist *sglist, in jazz_dma_map_sg() argument 549 for_each_sg(sglist, sg, nents, i) { in jazz_dma_map_sg() 562 static void jazz_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, in jazz_dma_unmap_sg() argument 568 for_each_sg(sglist, sg, nents, i) { in jazz_dma_unmap_sg()
|