/kernel/linux/linux-5.10/drivers/misc/cb710/ |
D | sgbuf2.c | 11 static bool sg_dwiter_next(struct sg_mapping_iter *miter) in sg_dwiter_next() argument 13 if (sg_miter_next(miter)) { in sg_dwiter_next() 14 miter->consumed = 0; in sg_dwiter_next() 20 static bool sg_dwiter_is_at_end(struct sg_mapping_iter *miter) in sg_dwiter_is_at_end() argument 22 return miter->length == miter->consumed && !sg_dwiter_next(miter); in sg_dwiter_is_at_end() 25 static uint32_t sg_dwiter_read_buffer(struct sg_mapping_iter *miter) in sg_dwiter_read_buffer() argument 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() 39 } while (sg_dwiter_next(miter)); in sg_dwiter_read_buffer() [all …]
|
/kernel/linux/linux-5.10/lib/ |
D | scatterlist.c | 755 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, in sg_miter_start() argument 758 memset(miter, 0, sizeof(struct sg_mapping_iter)); in sg_miter_start() 760 __sg_page_iter_start(&miter->piter, sgl, nents, 0); in sg_miter_start() 762 miter->__flags = flags; in sg_miter_start() 766 static bool sg_miter_get_next_page(struct sg_mapping_iter *miter) in sg_miter_get_next_page() argument 768 if (!miter->__remaining) { in sg_miter_get_next_page() 771 if (!__sg_page_iter_next(&miter->piter)) in sg_miter_get_next_page() 774 sg = miter->piter.sg; in sg_miter_get_next_page() 776 miter->__offset = miter->piter.sg_pgoffset ? 0 : sg->offset; in sg_miter_get_next_page() 777 miter->piter.sg_pgoffset += miter->__offset >> PAGE_SHIFT; in sg_miter_get_next_page() [all …]
|
/kernel/linux/linux-5.10/drivers/usb/storage/ |
D | protocol.c | 127 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 …]
|
/kernel/linux/linux-5.10/lib/mpi/ |
D | mpicoder.c | 366 struct sg_mapping_iter miter; in mpi_write_to_sgl() local 380 sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC | SG_MITER_TO_SG); in mpi_write_to_sgl() 381 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() 393 sg_miter_next(&miter); in mpi_write_to_sgl() 394 buf_len = miter.length; in mpi_write_to_sgl() 395 p2 = miter.addr; in mpi_write_to_sgl() 412 sg_miter_next(&miter); in mpi_write_to_sgl() 413 buf_len = miter.length; in mpi_write_to_sgl() [all …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | cb710.h | 154 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()
|
D | scatterlist.h | 511 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, 513 bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset); 514 bool sg_miter_next(struct sg_mapping_iter *miter); 515 void sg_miter_stop(struct sg_mapping_iter *miter);
|
/kernel/linux/linux-5.10/lib/crypto/ |
D | chacha20poly1305.c | 218 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()
|
/kernel/linux/linux-5.10/drivers/fpga/ |
D | fpga-mgr.c | 100 struct sg_mapping_iter miter; in fpga_mgr_write_init_sg() local 112 sg_miter_start(&miter, sgt->sgl, sgt->nents, SG_MITER_FROM_SG); in fpga_mgr_write_init_sg() 113 if (sg_miter_next(&miter) && in fpga_mgr_write_init_sg() 114 miter.length >= mgr->mops->initial_header_size) { in fpga_mgr_write_init_sg() 115 ret = fpga_mgr_write_init_buf(mgr, info, miter.addr, in fpga_mgr_write_init_sg() 116 miter.length); in fpga_mgr_write_init_sg() 117 sg_miter_stop(&miter); in fpga_mgr_write_init_sg() 120 sg_miter_stop(&miter); in fpga_mgr_write_init_sg() 189 struct sg_mapping_iter miter; in fpga_mgr_buf_load_sg() local 191 sg_miter_start(&miter, sgt->sgl, sgt->nents, SG_MITER_FROM_SG); in fpga_mgr_buf_load_sg() [all …]
|
/kernel/linux/linux-5.10/drivers/mmc/host/ |
D | jz4740_mmc.c | 171 struct sg_mapping_iter miter; member 501 struct sg_mapping_iter *miter = &host->miter; in jz4740_mmc_write_data() local 507 while (sg_miter_next(miter)) { in jz4740_mmc_write_data() 508 buf = miter->addr; in jz4740_mmc_write_data() 509 i = miter->length / 4; in jz4740_mmc_write_data() 539 data->bytes_xfered += miter->length; in jz4740_mmc_write_data() 541 sg_miter_stop(miter); in jz4740_mmc_write_data() 546 miter->consumed = (void *)buf - miter->addr; in jz4740_mmc_write_data() 547 data->bytes_xfered += miter->consumed; in jz4740_mmc_write_data() 548 sg_miter_stop(miter); in jz4740_mmc_write_data() [all …]
|
D | cb710-mmc.c | 245 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 …]
|
D | meson-gx-mmc.c | 749 struct sg_mapping_iter miter; in meson_mmc_copy_buffer() local 757 sg_miter_start(&miter, sgl, nents, sg_flags); in meson_mmc_copy_buffer() 759 while ((offset < buflen) && sg_miter_next(&miter)) { in meson_mmc_copy_buffer() 762 u32 *buf = miter.addr; in meson_mmc_copy_buffer() 764 len = min(miter.length, buflen - offset); in meson_mmc_copy_buffer() 786 sg_miter_stop(&miter); in meson_mmc_copy_buffer()
|
/kernel/linux/linux-5.10/drivers/nvme/target/ |
D | io-cmd-bdev.c | 173 struct sg_mapping_iter *miter) in nvmet_bdev_alloc_bip() argument 200 while (resid > 0 && sg_miter_next(miter)) { in nvmet_bdev_alloc_bip() 201 len = min_t(size_t, miter->length, resid); in nvmet_bdev_alloc_bip() 202 rc = bio_integrity_add_page(bio, miter->page, len, in nvmet_bdev_alloc_bip() 203 offset_in_page(miter->addr)); in nvmet_bdev_alloc_bip() 206 sg_miter_stop(miter); in nvmet_bdev_alloc_bip() 211 if (len < miter->length) in nvmet_bdev_alloc_bip() 212 miter->consumed -= miter->length - len; in nvmet_bdev_alloc_bip() 214 sg_miter_stop(miter); in nvmet_bdev_alloc_bip() 220 struct sg_mapping_iter *miter) in nvmet_bdev_alloc_bip() argument
|
/kernel/linux/linux-5.10/drivers/target/ |
D | target_core_iblock.c | 625 struct sg_mapping_iter *miter) in iblock_alloc_bip() argument 656 while (resid > 0 && sg_miter_next(miter)) { in iblock_alloc_bip() 658 len = min_t(size_t, miter->length, resid); in iblock_alloc_bip() 659 rc = bio_integrity_add_page(bio, miter->page, len, in iblock_alloc_bip() 660 offset_in_page(miter->addr)); in iblock_alloc_bip() 663 sg_miter_stop(miter); in iblock_alloc_bip() 668 miter->page, len, offset_in_page(miter->addr)); in iblock_alloc_bip() 671 if (len < miter->length) in iblock_alloc_bip() 672 miter->consumed -= miter->length - len; in iblock_alloc_bip() 674 sg_miter_stop(miter); in iblock_alloc_bip()
|
/kernel/linux/linux-5.10/drivers/memstick/host/ |
D | r592.c | 414 struct sg_mapping_iter miter; in r592_transfer_fifo_pio() local 430 sg_miter_start(&miter, &dev->req->sg, 1, SG_MITER_ATOMIC | in r592_transfer_fifo_pio() 434 while (sg_miter_next(&miter)) in r592_transfer_fifo_pio() 436 r592_write_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio() 438 r592_read_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio() 445 sg_miter_stop(&miter); in r592_transfer_fifo_pio()
|
/kernel/linux/linux-5.10/crypto/ |
D | adiantum.c | 254 struct sg_mapping_iter miter; in adiantum_hash_message() local 264 sg_miter_start(&miter, sgl, sg_nents(sgl), in adiantum_hash_message() 267 sg_miter_next(&miter); in adiantum_hash_message() 268 n = min_t(unsigned int, miter.length, bulk_len - i); in adiantum_hash_message() 269 err = crypto_shash_update(hash_desc, miter.addr, n); in adiantum_hash_message() 273 sg_miter_stop(&miter); in adiantum_hash_message()
|
/kernel/linux/linux-5.10/drivers/memstick/core/ |
D | ms_block.c | 98 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() 110 retval = memcmp(miter.addr + offset, buffer, cmplen) ? -1 : 0; in msb_sg_compare_to_buffer() 122 sg_miter_stop(&miter); in msb_sg_compare_to_buffer() 862 struct sg_mapping_iter miter; in msb_read_page() local 868 sg_miter_start(&miter, sg, sg_nents(sg), in msb_read_page() [all …]
|
/kernel/linux/linux-5.10/drivers/crypto/caam/ |
D | caampkc.c | 200 struct sg_mapping_iter miter; in caam_rsa_count_leading_zeros() local 210 sg_miter_start(&miter, sgl, ents, SG_MITER_FROM_SG | flags); in caam_rsa_count_leading_zeros() 225 if (!sg_miter_next(&miter)) in caam_rsa_count_leading_zeros() 228 buff = miter.addr; in caam_rsa_count_leading_zeros() 229 len = miter.length; in caam_rsa_count_leading_zeros() 235 miter.consumed = lzeros; in caam_rsa_count_leading_zeros() 236 sg_miter_stop(&miter); in caam_rsa_count_leading_zeros()
|
/kernel/linux/linux-5.10/drivers/usb/gadget/udc/ |
D | dummy_hcd.c | 229 struct sg_mapping_iter miter; member 1327 struct sg_mapping_iter *miter = &urbp->miter; in dummy_perform_transfer() local 1352 sg_miter_start(miter, urb->sg, urb->num_sgs, flags); in dummy_perform_transfer() 1355 next_sg = sg_miter_next(miter); in dummy_perform_transfer() 1361 ubuf = miter->addr; in dummy_perform_transfer() 1362 this_sg = min_t(u32, len, miter->length); in dummy_perform_transfer() 1363 miter->consumed = this_sg; in dummy_perform_transfer() 1374 next_sg = sg_miter_next(miter); in dummy_perform_transfer() 1383 sg_miter_stop(miter); in dummy_perform_transfer()
|
/kernel/linux/linux-5.10/drivers/ata/ |
D | libata-scsi.c | 3376 struct sg_mapping_iter miter; in ata_scsi_report_zones_complete() local 3380 sg_miter_start(&miter, scsi_sglist(scmd), scsi_sg_count(scmd), in ata_scsi_report_zones_complete() 3384 while (sg_miter_next(&miter)) { in ata_scsi_report_zones_complete() 3394 hdr = miter.addr; in ata_scsi_report_zones_complete() 3406 while (offset < miter.length) { in ata_scsi_report_zones_complete() 3412 rec = miter.addr + offset; in ata_scsi_report_zones_complete() 3425 WARN_ON(offset + 64 > miter.length); in ata_scsi_report_zones_complete() 3430 sg_miter_stop(&miter); in ata_scsi_report_zones_complete()
|
/kernel/linux/linux-5.10/drivers/scsi/lpfc/ |
D | lpfc_bsg.c | 227 struct sg_mapping_iter miter; in lpfc_bsg_copy_data() local 239 sg_miter_start(&miter, bsg_buffers->sg_list, bsg_buffers->sg_cnt, in lpfc_bsg_copy_data() 242 sg_valid = sg_miter_next(&miter); in lpfc_bsg_copy_data() 250 sg_address = miter.addr + sg_offset; in lpfc_bsg_copy_data() 251 transfer_bytes = miter.length - sg_offset; in lpfc_bsg_copy_data() 253 sg_address = miter.addr; in lpfc_bsg_copy_data() 254 transfer_bytes = miter.length; in lpfc_bsg_copy_data() 268 if (sg_offset >= miter.length) { in lpfc_bsg_copy_data() 270 sg_valid = sg_miter_next(&miter); in lpfc_bsg_copy_data() 274 sg_miter_stop(&miter); in lpfc_bsg_copy_data()
|
/kernel/linux/linux-5.10/drivers/scsi/ |
D | scsi_debug.c | 3068 struct sg_mapping_iter miter; in dif_copy_prot() local 3073 sg_miter_start(&miter, scsi_prot_sglist(scp), in dif_copy_prot() 3077 while (sg_miter_next(&miter) && resid > 0) { in dif_copy_prot() 3078 size_t len = min_t(size_t, miter.length, resid); in dif_copy_prot() 3085 paddr = miter.addr; in dif_copy_prot() 3102 sg_miter_stop(&miter); in dif_copy_prot()
|
/kernel/linux/patches/linux-5.10/imx8mm_patch/patches/drivers/ |
D | 0030_linux_drivers_pci_misc_nvmem_of_mtd_mmc.patch | 5669 - struct sg_mapping_iter miter; 5677 - sg_miter_start(&miter, sgl, nents, sg_flags); 5679 - while ((offset < buflen) && sg_miter_next(&miter)) { 5682 - u32 *buf = miter.addr; 5684 - len = min(miter.length, buflen - offset); 5706 - sg_miter_stop(&miter);
|