/linux-master/drivers/crypto/cavium/nitrox/ |
H A D | nitrox_req.h | 555 static inline void *alloc_req_buf(int nents, int extralen, gfp_t gfp) argument 559 size = sizeof(struct scatterlist) * nents; 621 int nents, int ivsize) 625 nkreq->src = alloc_req_buf(nents, ivsize, creq->gfp); 643 int nents, int ivsize, 652 sg_init_table(sg, nents); 667 int nents) 672 nkreq->dst = alloc_req_buf(nents, extralen, creq->gfp); 701 int nents, int ivsize, 710 sg_init_table(sg, nents); 620 alloc_src_req_buf(struct nitrox_kcrypt_request *nkreq, int nents, int ivsize) argument 642 nitrox_creq_set_src_sg(struct nitrox_kcrypt_request *nkreq, int nents, int ivsize, struct scatterlist *src, int buflen) argument 666 alloc_dst_req_buf(struct nitrox_kcrypt_request *nkreq, int nents) argument 700 nitrox_creq_set_dst_sg(struct nitrox_kcrypt_request *nkreq, int nents, int ivsize, struct scatterlist *dst, int buflen) argument [all...] |
H A D | nitrox_aead.c | 97 int nents = sg_nents_for_len(src, buflen); local 100 if (nents < 0) 101 return nents; 104 nents += 1; 106 ret = alloc_src_req_buf(nkreq, nents, ivsize); 111 nitrox_creq_set_src_sg(nkreq, nents, ivsize, src, buflen); 119 int nents = sg_nents_for_len(dst, buflen); local 122 if (nents < 0) 123 return nents; 126 nents [all...] |
H A D | nitrox_reqmgr.c | 163 int i, nents, ret = 0; local 165 nents = dma_map_sg(dev, req->src, sg_nents(req->src), 167 if (!nents) 170 for_each_sg(req->src, sg, nents, i) 174 sr->in.sgmap_cnt = nents; 191 int nents, ret = 0; local 193 nents = dma_map_sg(dev, req->dst, sg_nents(req->dst), 195 if (!nents) 199 sr->out.sgmap_cnt = nents;
|
H A D | nitrox_skcipher.c | 211 int nents = sg_nents(skreq->src) + 1; local 215 ret = alloc_src_req_buf(nkreq, nents, ivsize); 220 nitrox_creq_set_src_sg(nkreq, nents, ivsize, skreq->src, 229 int nents = sg_nents(skreq->dst) + 3; local 235 ret = alloc_dst_req_buf(nkreq, nents); 241 nitrox_creq_set_dst_sg(nkreq, nents, ivsize, skreq->dst,
|
/linux-master/drivers/media/pci/intel/ipu6/ |
H A D | ipu6-dma.c | 141 int nents, enum dma_data_direction dir) 146 for_each_sg(sglist, sg, nents, i) 328 int nents, enum dma_data_direction dir, 339 if (!nents) 346 ipu6_dma_sync_sg_for_cpu(dev, sglist, nents, DMA_BIDIRECTIONAL); 348 /* get the nents as orig_nents given by caller */ 351 for_each_sg(sglist, sg, nents, i) { 364 * assume the nents is less than orig_nents as the least granule 384 dma_unmap_sg_attrs(&pdev->dev, sglist, nents, dir, attrs); 390 int nents, enu 139 ipu6_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir) argument 326 ipu6_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir, unsigned long attrs) argument 389 ipu6_dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir, unsigned long attrs) argument [all...] |
/linux-master/drivers/infiniband/hw/usnic/ |
H A D | usnic_uiom.c | 74 for_each_sg(chunk->page_list, sg, chunk->nents, i) { 160 chunk->nents = min_t(int, ret, USNIC_UIOM_PAGE_CHUNK); 161 sg_init_table(chunk->page_list, chunk->nents); 162 for_each_sg(chunk->page_list, sg, chunk->nents, i) { 169 cur_base += chunk->nents * PAGE_SIZE; 170 ret -= chunk->nents; 171 off += chunk->nents; 259 for (i = 0; i < chunk->nents; i++, va += PAGE_SIZE) { 310 if (i == chunk->nents) {
|
/linux-master/arch/sparc/mm/ |
H A D | iommu.c | 250 int nents, enum dma_data_direction dir, unsigned long attrs, 256 for_each_sg(sgl, sg, nents, j) { 264 return nents; 268 int nents, enum dma_data_direction dir, unsigned long attrs) 271 return __sbus_iommu_map_sg(dev, sgl, nents, dir, attrs, false); 275 int nents, enum dma_data_direction dir, unsigned long attrs) 277 return __sbus_iommu_map_sg(dev, sgl, nents, dir, attrs, true); 300 int nents, enum dma_data_direction dir, unsigned long attrs) 305 for_each_sg(sgl, sg, nents, i) { 249 __sbus_iommu_map_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs, bool per_page_flush) argument 267 sbus_iommu_map_sg_gflush(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) argument 274 sbus_iommu_map_sg_pflush(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) argument 299 sbus_iommu_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) argument
|
H A D | io-unit.c | 163 static int iounit_map_sg(struct device *dev, struct scatterlist *sgl, int nents, argument 173 for_each_sg(sgl, sg, nents, i) { 178 return nents; 197 int nents, enum dma_data_direction dir, unsigned long attrs) 205 for_each_sg(sgl, sg, nents, i) { 196 iounit_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) argument
|
/linux-master/arch/mips/jazz/ |
H A D | jazzdma.c | 544 int nents, enum dma_data_direction dir, unsigned long attrs) 549 for_each_sg(sglist, sg, nents, i) { 559 return nents; 563 int nents, enum dma_data_direction dir, unsigned long attrs) 568 for_each_sg(sglist, sg, nents, i) { 588 struct scatterlist *sgl, int nents, enum dma_data_direction dir) 593 for_each_sg(sgl, sg, nents, i) 598 struct scatterlist *sgl, int nents, enum dma_data_direction dir) 603 for_each_sg(sgl, sg, nents, i) 543 jazz_dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir, unsigned long attrs) argument 562 jazz_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction dir, unsigned long attrs) argument 587 jazz_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir) argument 597 jazz_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir) argument
|
/linux-master/drivers/staging/media/ipu3/ |
H A D | ipu3-dmamap.c | 185 int nents, struct imgu_css_map *map) 193 for_each_sg(sglist, sg, nents, i) { 197 if (i != nents - 1 && !PAGE_ALIGNED(sg->length)) 205 nents, size >> shift); 216 sglist, nents) < size) 184 imgu_dmamap_map_sg(struct imgu_device *imgu, struct scatterlist *sglist, int nents, struct imgu_css_map *map) argument
|
/linux-master/kernel/dma/ |
H A D | mapping.c | 187 int nents, enum dma_data_direction dir, unsigned long attrs) 198 arch_dma_map_sg_direct(dev, sg, nents)) 199 ents = dma_direct_map_sg(dev, sg, nents, dir, attrs); 201 ents = ops->map_sg(dev, sg, nents, dir, attrs); 204 kmsan_handle_dma_sg(sg, nents, dir); 205 debug_dma_map_sg(dev, sg, nents, ents, dir, attrs); 218 * @nents: Number of entries to map 223 * nents segments for the @dir DMA operation by the @dev device. 225 * Returns the number of mapped entries (which can be less than nents) 229 * original sg and original nents (no 186 __dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument 231 dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument 273 int nents; local 283 dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument [all...] |
H A D | debug.h | 21 int nents, int mapped_ents, int direction, 71 int nents, int mapped_ents, int direction, 70 debug_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, int mapped_ents, int direction, unsigned long attrs) argument
|
H A D | direct.c | 399 struct scatterlist *sgl, int nents, enum dma_data_direction dir) 404 for_each_sg(sgl, sg, nents, i) { 422 struct scatterlist *sgl, int nents, enum dma_data_direction dir) 427 for_each_sg(sgl, sg, nents, i) { 450 int nents, enum dma_data_direction dir, unsigned long attrs) 455 for_each_sg(sgl, sg, nents, i) { 465 int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, argument 473 for_each_sg(sgl, sg, nents, i) { 502 return nents; 398 dma_direct_sync_sg_for_device(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir) argument 421 dma_direct_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir) argument 449 dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) argument
|
/linux-master/drivers/spi/ |
H A D | spi-ep93xx.c | 285 int i, ret, nents; local 325 nents = DIV_ROUND_UP(len, PAGE_SIZE); 326 if (nents != sgt->nents) { 329 ret = sg_alloc_table(sgt, nents, GFP_KERNEL); 335 for_each_sg(sgt->sgl, sg, sgt->nents, i) { 355 nents = dma_map_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); 356 if (!nents) 359 txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents, con [all...] |
/linux-master/drivers/gpu/drm/i915/selftests/ |
H A D | scatterlist.c | 51 for_each_sg(pt->st.sgl, sg, pt->st.nents, n) { 53 unsigned int npages = npages_fn(n, pt->st.nents, rnd); 89 for_each_sg_page(pt->st.sgl, &sgiter, pt->st.nents, 0) { 263 pt->st.nents = n; 350 pt.st.nents != prime) { 351 pr_err("i915_sg_trim failed (nents %u, orig_nents %u), expected %lu\n", 352 pt.st.nents, pt.st.orig_nents, prime);
|
/linux-master/include/linux/ |
H A D | kmsan.h | 201 * @nents: number of scatterlist entries. 209 void kmsan_handle_dma_sg(struct scatterlist *sg, int nents, 319 static inline void kmsan_handle_dma_sg(struct scatterlist *sg, int nents, argument
|
H A D | dma-map-ops.h | 63 int (*map_sg)(struct device *dev, struct scatterlist *sg, int nents, 65 void (*unmap_sg)(struct device *dev, struct scatterlist *sg, int nents, 79 int nents, enum dma_data_direction dir); 81 int nents, enum dma_data_direction dir); 430 int nents); 432 int nents);
|
/linux-master/arch/x86/kernel/ |
H A D | amd_gart_64.c | 276 static void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, argument 282 for_each_sg(sg, s, nents, i) { 291 int nents, int dir) 300 for_each_sg(sg, s, nents, i) { 308 nents = 0; 318 return nents; 377 static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, argument 386 if (nents == 0) 397 for_each_sg(sg, s, nents, i) { 439 if (out < nents) { 290 dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg, int nents, int dir) argument [all...] |
/linux-master/drivers/crypto/ccree/ |
H A D | cc_buffer_mgr.h | 29 unsigned int nents; //sg nents member in struct:cc_mlli 30 unsigned int mlli_nents; //mlli nents might be different than the above
|
/linux-master/arch/powerpc/kernel/ |
H A D | dma-iommu.c | 36 int nents) 44 for_each_sg(sg, s, nents, i) { 53 int nents) 61 for_each_sg(sg, s, nents, i) { 35 arch_dma_map_sg_direct(struct device *dev, struct scatterlist *sg, int nents) argument 52 arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg, int nents) argument
|
/linux-master/drivers/xen/ |
H A D | grant-dma-ops.c | 235 int nents, enum dma_data_direction dir, 244 for_each_sg(sg, s, nents, i) 250 int nents, enum dma_data_direction dir, 259 for_each_sg(sg, s, nents, i) { 268 return nents; 234 xen_grant_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument 249 xen_grant_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument
|
/linux-master/drivers/iommu/ |
H A D | dma-iommu.c | 614 int nents, enum dma_data_direction dir) 631 for_each_sg(sg, s, nents, i) 1223 static int __finalise_sg(struct device *dev, struct scatterlist *sg, int nents, argument 1231 for_each_sg(sg, s, nents, i) { 1291 static void __invalidate_sg(struct scatterlist *sg, int nents) argument 1296 for_each_sg(sg, s, nents, i) { 1311 int nents, enum dma_data_direction dir, unsigned long attrs) 1316 for_each_sg(sg, s, nents, i) 1322 int nents, enum dma_data_direction dir, unsigned long attrs) 1329 for_each_sg(sg, s, nents, 613 dev_use_sg_swiotlb(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) argument 1310 iommu_dma_unmap_sg_swiotlb(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument 1321 iommu_dma_map_sg_swiotlb(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument 1351 iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument 1471 iommu_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs) argument [all...] |
/linux-master/drivers/crypto/bcm/ |
H A D | util.c | 54 unsigned int nents = sg_nents(src); local 56 copied = sg_pcopy_to_buffer(src, nents, dest, len, skip); 60 flow_log("sg with %u entries and skip %u\n", nents, skip); 73 unsigned int nents = sg_nents(dest); local 75 copied = sg_pcopy_from_buffer(dest, nents, src, len, skip); 79 flow_log("sg with %u entries and skip %u\n", nents, skip);
|
/linux-master/drivers/dma/hsu/ |
H A D | hsu.c | 85 count = desc->nents - desc->active; 229 } else if (desc->active < desc->nents) { 244 static struct hsu_dma_desc *hsu_dma_alloc_desc(unsigned int nents) argument 252 desc->sg = kcalloc(nents, sizeof(*desc->sg), GFP_NOWAIT); 290 desc->nents = sg_len; 315 for (i = desc->active; i < desc->nents; i++)
|
/linux-master/net/rds/ |
H A D | message.c | 311 struct scatterlist *rds_message_alloc_sgs(struct rds_message *rm, int nents) argument 316 if (nents <= 0) { 317 pr_warn("rds: alloc sgs failed! nents <= 0\n"); 321 if (rm->m_used_sgs + nents > rm->m_total_sgs) { 322 pr_warn("rds: alloc sgs failed! total %d used %d nents %d\n", 323 rm->m_total_sgs, rm->m_used_sgs, nents); 328 sg_init_table(sg_ret, nents); 329 rm->m_used_sgs += nents;
|