Home
last modified time | relevance | path

Searched refs:miter (Results 1 – 24 of 24) sorted by relevance

/linux-6.3-rc2/drivers/misc/cb710/
A Dsgbuf2.c13 if (sg_miter_next(miter)) { in sg_dwiter_next()
14 miter->consumed = 0; in sg_dwiter_next()
22 return miter->length == miter->consumed && !sg_dwiter_next(miter); in sg_dwiter_is_at_end()
32 len = min(miter->length - miter->consumed, left); in sg_dwiter_read_buffer()
33 memcpy(addr, miter->addr + miter->consumed, len); in sg_dwiter_read_buffer()
34 miter->consumed += len; in sg_dwiter_read_buffer()
61 len = miter->length - miter->consumed; in sg_dwiter_get_next_block()
64 miter->addr + miter->consumed))) { in sg_dwiter_get_next_block()
65 *ptr = miter->addr + miter->consumed; in sg_dwiter_get_next_block()
66 miter->consumed += 4; in sg_dwiter_get_next_block()
[all …]
/linux-6.3-rc2/lib/
A Dscatterlist.c817 miter->__offset = miter->piter.sg_pgoffset ? 0 : sg->offset; in sg_miter_get_next_page()
818 miter->piter.sg_pgoffset += miter->__offset >> PAGE_SHIFT; in sg_miter_get_next_page()
823 miter->__remaining = min_t(unsigned long, miter->__remaining, in sg_miter_get_next_page()
894 miter->page = sg_page_iter_page(&miter->piter); in sg_miter_next()
895 miter->consumed = miter->length = miter->__remaining; in sg_miter_next()
898 miter->addr = kmap_atomic(miter->page) + miter->__offset; in sg_miter_next()
900 miter->addr = kmap(miter->page) + miter->__offset; in sg_miter_next()
921 WARN_ON(miter->consumed > miter->length); in sg_miter_stop()
924 if (miter->addr) { in sg_miter_stop()
925 miter->__offset += miter->consumed; in sg_miter_stop()
[all …]
/linux-6.3-rc2/drivers/usb/storage/
A Dprotocol.c127 struct sg_mapping_iter miter; in usb_stor_access_xfer_buf() local
135 sg_miter_start(&miter, sg, nents, dir == FROM_XFER_BUF ? in usb_stor_access_xfer_buf()
138 if (!sg_miter_skip(&miter, *offset)) in usb_stor_access_xfer_buf()
141 while (sg_miter_next(&miter) && cnt < buflen) { in usb_stor_access_xfer_buf()
142 unsigned int len = min_t(unsigned int, miter.length, in usb_stor_access_xfer_buf()
146 memcpy(buffer + cnt, miter.addr, len); in usb_stor_access_xfer_buf()
148 memcpy(miter.addr, buffer + cnt, len); in usb_stor_access_xfer_buf()
150 if (*offset + len < miter.piter.sg->length) { in usb_stor_access_xfer_buf()
152 *sgptr = miter.piter.sg; in usb_stor_access_xfer_buf()
155 *sgptr = sg_next(miter.piter.sg); in usb_stor_access_xfer_buf()
[all …]
/linux-6.3-rc2/lib/mpi/
A Dmpicoder.c381 sg_miter_next(&miter); in mpi_write_to_sgl()
382 buf_len = miter.length; in mpi_write_to_sgl()
383 p2 = miter.addr; in mpi_write_to_sgl()
395 p2 = miter.addr; in mpi_write_to_sgl()
414 p2 = miter.addr; in mpi_write_to_sgl()
419 sg_miter_stop(&miter); in mpi_write_to_sgl()
465 sg_miter_next(&miter); in mpi_read_raw_from_sgl()
466 buff = miter.addr; in mpi_read_raw_from_sgl()
467 len = miter.length; in mpi_read_raw_from_sgl()
486 sg_miter_stop(&miter); in mpi_read_raw_from_sgl()
[all …]
/linux-6.3-rc2/drivers/fpga/
A Dfpga-mgr.c184 struct sg_mapping_iter miter; in fpga_mgr_parse_header_sg_first() local
190 if (sg_miter_next(&miter) && in fpga_mgr_parse_header_sg_first()
192 ret = fpga_mgr_parse_header(mgr, info, miter.addr, miter.length); in fpga_mgr_parse_header_sg_first()
195 sg_miter_stop(&miter); in fpga_mgr_parse_header_sg_first()
297 struct sg_mapping_iter miter; in fpga_mgr_prepare_sg() local
314 if (sg_miter_next(&miter)) { in fpga_mgr_prepare_sg()
316 miter.length); in fpga_mgr_prepare_sg()
317 sg_miter_stop(&miter); in fpga_mgr_prepare_sg()
320 sg_miter_stop(&miter); in fpga_mgr_prepare_sg()
391 length = miter.length; in fpga_mgr_buf_load_sg()
[all …]
/linux-6.3-rc2/include/linux/
A Dcb710.h154 uint32_t cb710_sg_dwiter_read_next_block(struct sg_mapping_iter *miter);
155 void cb710_sg_dwiter_write_next_block(struct sg_mapping_iter *miter, uint32_t data);
172 static inline void cb710_sg_dwiter_write_from_io(struct sg_mapping_iter *miter, in cb710_sg_dwiter_write_from_io() argument
176 cb710_sg_dwiter_write_next_block(miter, ioread32(port)); in cb710_sg_dwiter_write_from_io()
194 static inline void cb710_sg_dwiter_read_to_io(struct sg_mapping_iter *miter, in cb710_sg_dwiter_read_to_io() argument
198 iowrite32(cb710_sg_dwiter_read_next_block(miter), port); in cb710_sg_dwiter_read_to_io()
A Dscatterlist.h629 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
631 bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset);
632 bool sg_miter_next(struct sg_mapping_iter *miter);
633 void sg_miter_stop(struct sg_mapping_iter *miter);
/linux-6.3-rc2/lib/crypto/
A Dchacha20poly1305.c218 struct sg_mapping_iter miter; in chacha20poly1305_crypt_sg_inplace() local
256 sg_miter_start(&miter, src, sg_nents(src), flags); in chacha20poly1305_crypt_sg_inplace()
258 for (sl = src_len; sl > 0 && sg_miter_next(&miter); sl -= miter.length) { in chacha20poly1305_crypt_sg_inplace()
259 u8 *addr = miter.addr; in chacha20poly1305_crypt_sg_inplace()
260 size_t length = min_t(size_t, sl, miter.length); in chacha20poly1305_crypt_sg_inplace()
293 poly1305_update(&poly1305_state, miter.addr, in chacha20poly1305_crypt_sg_inplace()
294 min_t(size_t, sl, miter.length)); in chacha20poly1305_crypt_sg_inplace()
307 miter.addr + miter.length + sl); in chacha20poly1305_crypt_sg_inplace()
312 miter.addr + miter.length + sl, in chacha20poly1305_crypt_sg_inplace()
317 sg_miter_stop(&miter); in chacha20poly1305_crypt_sg_inplace()
/linux-6.3-rc2/drivers/mmc/host/
A Djz4740_mmc.c518 struct sg_mapping_iter *miter = &host->miter; in jz4740_mmc_write_data() local
525 buf = miter->addr; in jz4740_mmc_write_data()
558 sg_miter_stop(miter); in jz4740_mmc_write_data()
563 miter->consumed = (void *)buf - miter->addr; in jz4740_mmc_write_data()
565 sg_miter_stop(miter); in jz4740_mmc_write_data()
573 struct sg_mapping_iter *miter = &host->miter; in jz4740_mmc_read_data() local
582 buf = miter->addr; in jz4740_mmc_read_data()
583 i = miter->length; in jz4740_mmc_read_data()
620 sg_miter_stop(miter); in jz4740_mmc_read_data()
634 miter->consumed = (void *)buf - miter->addr; in jz4740_mmc_read_data()
[all …]
A Dcb710-mmc.c245 struct sg_mapping_iter *miter, size_t dw_count) in cb710_mmc_receive_pio() argument
254 cb710_sg_dwiter_write_from_io(miter, in cb710_mmc_receive_pio()
267 struct sg_mapping_iter miter; in cb710_mmc_receive() local
276 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_TO_SG); in cb710_mmc_receive()
287 err = cb710_mmc_receive_pio(slot, &miter, 4); in cb710_mmc_receive()
300 err = cb710_mmc_receive_pio(slot, &miter, len); in cb710_mmc_receive()
305 sg_miter_stop(&miter); in cb710_mmc_receive()
311 struct sg_mapping_iter miter; in cb710_mmc_send() local
320 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_FROM_SG); in cb710_mmc_send()
335 cb710_sg_dwiter_read_to_io(&miter, in cb710_mmc_send()
[all …]
A Dmeson-gx-mmc.c765 struct sg_mapping_iter miter; in meson_mmc_copy_buffer() local
773 sg_miter_start(&miter, sgl, nents, sg_flags); in meson_mmc_copy_buffer()
775 while ((offset < buflen) && sg_miter_next(&miter)) { in meson_mmc_copy_buffer()
778 u32 *buf = miter.addr; in meson_mmc_copy_buffer()
780 len = min(miter.length, buflen - offset); in meson_mmc_copy_buffer()
802 sg_miter_stop(&miter); in meson_mmc_copy_buffer()
/linux-6.3-rc2/drivers/nvme/target/
A Dio-cmd-bdev.c189 struct sg_mapping_iter *miter) in nvmet_bdev_alloc_bip() argument
215 while (resid > 0 && sg_miter_next(miter)) { in nvmet_bdev_alloc_bip()
216 len = min_t(size_t, miter->length, resid); in nvmet_bdev_alloc_bip()
217 rc = bio_integrity_add_page(bio, miter->page, len, in nvmet_bdev_alloc_bip()
218 offset_in_page(miter->addr)); in nvmet_bdev_alloc_bip()
221 sg_miter_stop(miter); in nvmet_bdev_alloc_bip()
226 if (len < miter->length) in nvmet_bdev_alloc_bip()
227 miter->consumed -= miter->length - len; in nvmet_bdev_alloc_bip()
229 sg_miter_stop(miter); in nvmet_bdev_alloc_bip()
235 struct sg_mapping_iter *miter) in nvmet_bdev_alloc_bip() argument
/linux-6.3-rc2/drivers/crypto/marvell/cesa/
A Dtdma.c360 struct sg_mapping_iter miter; in mv_cesa_sg_copy() local
368 sg_miter_start(&miter, sgl, nents, sg_flags); in mv_cesa_sg_copy()
370 if (!sg_miter_skip(&miter, skip)) in mv_cesa_sg_copy()
373 while ((offset < buflen) && sg_miter_next(&miter)) { in mv_cesa_sg_copy()
376 len = min(miter.length, buflen - offset); in mv_cesa_sg_copy()
381 miter.addr, len); in mv_cesa_sg_copy()
384 miter.addr, len); in mv_cesa_sg_copy()
387 memcpy(miter.addr, in mv_cesa_sg_copy()
391 memcpy_fromio(miter.addr, in mv_cesa_sg_copy()
399 sg_miter_stop(&miter); in mv_cesa_sg_copy()
/linux-6.3-rc2/drivers/target/
A Dtarget_core_iblock.c666 struct sg_mapping_iter *miter) in iblock_alloc_bip() argument
696 while (resid > 0 && sg_miter_next(miter)) { in iblock_alloc_bip()
698 len = min_t(size_t, miter->length, resid); in iblock_alloc_bip()
699 rc = bio_integrity_add_page(bio, miter->page, len, in iblock_alloc_bip()
700 offset_in_page(miter->addr)); in iblock_alloc_bip()
703 sg_miter_stop(miter); in iblock_alloc_bip()
708 miter->page, len, offset_in_page(miter->addr)); in iblock_alloc_bip()
711 if (len < miter->length) in iblock_alloc_bip()
712 miter->consumed -= miter->length - len; in iblock_alloc_bip()
714 sg_miter_stop(miter); in iblock_alloc_bip()
/linux-6.3-rc2/drivers/memstick/host/
A Dr592.c417 struct sg_mapping_iter miter; in r592_transfer_fifo_pio() local
433 sg_miter_start(&miter, &dev->req->sg, 1, SG_MITER_ATOMIC | in r592_transfer_fifo_pio()
437 while (sg_miter_next(&miter)) in r592_transfer_fifo_pio()
439 r592_write_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio()
441 r592_read_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio()
448 sg_miter_stop(&miter); in r592_transfer_fifo_pio()
/linux-6.3-rc2/crypto/
A Dhctr2.c200 struct sg_mapping_iter miter; in hctr2_hash_message() local
206 sg_miter_start(&miter, sgl, sg_nents(sgl), in hctr2_hash_message()
209 sg_miter_next(&miter); in hctr2_hash_message()
210 n = min_t(unsigned int, miter.length, bulk_len - i); in hctr2_hash_message()
211 err = crypto_shash_update(hash_desc, miter.addr, n); in hctr2_hash_message()
215 sg_miter_stop(&miter); in hctr2_hash_message()
A Dadiantum.c255 struct sg_mapping_iter miter; in adiantum_hash_message() local
265 sg_miter_start(&miter, sgl, sg_nents(sgl), in adiantum_hash_message()
268 sg_miter_next(&miter); in adiantum_hash_message()
269 n = min_t(unsigned int, miter.length, bulk_len - i); in adiantum_hash_message()
270 err = crypto_shash_update(hash_desc, miter.addr, n); in adiantum_hash_message()
274 sg_miter_stop(&miter); in adiantum_hash_message()
/linux-6.3-rc2/drivers/memstick/core/
A Dms_block.c98 struct sg_mapping_iter miter; in msb_sg_compare_to_buffer() local
100 sg_miter_start(&miter, sg, sg_nents(sg), in msb_sg_compare_to_buffer()
103 while (sg_miter_next(&miter) && len > 0) { in msb_sg_compare_to_buffer()
104 if (offset >= miter.length) { in msb_sg_compare_to_buffer()
105 offset -= miter.length; in msb_sg_compare_to_buffer()
109 cmplen = min(miter.length - offset, len); in msb_sg_compare_to_buffer()
122 sg_miter_stop(&miter); in msb_sg_compare_to_buffer()
866 struct sg_mapping_iter miter; in msb_read_page() local
872 sg_miter_start(&miter, sg, sg_nents(sg), in msb_read_page()
880 offset -= miter.length; in msb_read_page()
[all …]
/linux-6.3-rc2/drivers/crypto/caam/
A Dcaampkc.c203 struct sg_mapping_iter miter; in caam_rsa_count_leading_zeros() local
213 sg_miter_start(&miter, sgl, ents, SG_MITER_FROM_SG | flags); in caam_rsa_count_leading_zeros()
228 sg_miter_next(&miter); in caam_rsa_count_leading_zeros()
229 buff = miter.addr; in caam_rsa_count_leading_zeros()
230 len = miter.length; in caam_rsa_count_leading_zeros()
236 miter.consumed = lzeros; in caam_rsa_count_leading_zeros()
237 sg_miter_stop(&miter); in caam_rsa_count_leading_zeros()
/linux-6.3-rc2/drivers/usb/gadget/udc/
A Ddummy_hcd.c229 struct sg_mapping_iter miter; member
1339 struct sg_mapping_iter *miter = &urbp->miter; in dummy_perform_transfer() local
1364 sg_miter_start(miter, urb->sg, urb->num_sgs, flags); in dummy_perform_transfer()
1367 next_sg = sg_miter_next(miter); in dummy_perform_transfer()
1373 ubuf = miter->addr; in dummy_perform_transfer()
1374 this_sg = min_t(u32, len, miter->length); in dummy_perform_transfer()
1375 miter->consumed = this_sg; in dummy_perform_transfer()
1386 next_sg = sg_miter_next(miter); in dummy_perform_transfer()
1395 sg_miter_stop(miter); in dummy_perform_transfer()
/linux-6.3-rc2/drivers/ata/
A Dlibata-scsi.c3315 struct sg_mapping_iter miter; in ata_scsi_report_zones_complete() local
3319 sg_miter_start(&miter, scsi_sglist(scmd), scsi_sg_count(scmd), in ata_scsi_report_zones_complete()
3323 while (sg_miter_next(&miter)) { in ata_scsi_report_zones_complete()
3333 hdr = miter.addr; in ata_scsi_report_zones_complete()
3345 while (offset < miter.length) { in ata_scsi_report_zones_complete()
3351 rec = miter.addr + offset; in ata_scsi_report_zones_complete()
3364 WARN_ON(offset + 64 > miter.length); in ata_scsi_report_zones_complete()
3369 sg_miter_stop(&miter); in ata_scsi_report_zones_complete()
/linux-6.3-rc2/drivers/scsi/lpfc/
A Dlpfc_bsg.c218 struct sg_mapping_iter miter; in lpfc_bsg_copy_data() local
230 sg_miter_start(&miter, bsg_buffers->sg_list, bsg_buffers->sg_cnt, in lpfc_bsg_copy_data()
233 sg_valid = sg_miter_next(&miter); in lpfc_bsg_copy_data()
241 sg_address = miter.addr + sg_offset; in lpfc_bsg_copy_data()
242 transfer_bytes = miter.length - sg_offset; in lpfc_bsg_copy_data()
244 sg_address = miter.addr; in lpfc_bsg_copy_data()
245 transfer_bytes = miter.length; in lpfc_bsg_copy_data()
259 if (sg_offset >= miter.length) { in lpfc_bsg_copy_data()
261 sg_valid = sg_miter_next(&miter); in lpfc_bsg_copy_data()
265 sg_miter_stop(&miter); in lpfc_bsg_copy_data()
/linux-6.3-rc2/drivers/scsi/
A Dscsi_debug.c3151 struct sg_mapping_iter miter; in dif_copy_prot() local
3156 sg_miter_start(&miter, scsi_prot_sglist(scp), in dif_copy_prot()
3160 while (sg_miter_next(&miter) && resid > 0) { in dif_copy_prot()
3161 size_t len = min_t(size_t, miter.length, resid); in dif_copy_prot()
3168 paddr = miter.addr; in dif_copy_prot()
3185 sg_miter_stop(&miter); in dif_copy_prot()
/linux-6.3-rc2/drivers/net/ethernet/microchip/vcap/
A Dvcap_api.c1444 struct vcap_stream_iter kiter, miter; in vcap_decode_keyset() local
1480 vcap_iter_init(&miter, vctrl->vcaps[vt].sw_width, tgt, in vcap_decode_keyset()
1482 vcap_decode_field(maskstream, &miter, keyfield[idx].width, in vcap_decode_keyset()

Completed in 96 milliseconds