piter 159 block/genhd.c void disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk, piter 167 block/genhd.c piter->disk = disk; piter 168 block/genhd.c piter->part = NULL; piter 171 block/genhd.c piter->idx = ptbl->len - 1; piter 173 block/genhd.c piter->idx = 0; piter 175 block/genhd.c piter->idx = 1; piter 177 block/genhd.c piter->flags = flags; piter 192 block/genhd.c struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter) piter 198 block/genhd.c disk_put_part(piter->part); piter 199 block/genhd.c piter->part = NULL; piter 203 block/genhd.c ptbl = rcu_dereference(piter->disk->part_tbl); piter 206 block/genhd.c if (piter->flags & DISK_PITER_REVERSE) { piter 208 block/genhd.c if (piter->flags & (DISK_PITER_INCL_PART0 | piter 219 block/genhd.c for (; piter->idx != end; piter->idx += inc) { piter 222 block/genhd.c part = rcu_dereference(ptbl->part[piter->idx]); piter 226 block/genhd.c !(piter->flags & DISK_PITER_INCL_EMPTY) && piter 227 block/genhd.c !(piter->flags & DISK_PITER_INCL_EMPTY_PART0 && piter 228 block/genhd.c piter->idx == 0)) piter 232 block/genhd.c piter->part = part; piter 233 block/genhd.c piter->idx += inc; piter 239 block/genhd.c return piter->part; piter 252 block/genhd.c void disk_part_iter_exit(struct disk_part_iter *piter) piter 254 block/genhd.c disk_put_part(piter->part); piter 255 block/genhd.c piter->part = NULL; piter 601 block/genhd.c struct disk_part_iter piter; piter 666 block/genhd.c disk_part_iter_init(&piter, disk, 0); piter 667 block/genhd.c while ((part = disk_part_iter_next(&piter))) piter 669 block/genhd.c disk_part_iter_exit(&piter); piter 775 block/genhd.c struct disk_part_iter piter; piter 787 block/genhd.c disk_part_iter_init(&piter, disk, piter 789 block/genhd.c while ((part = disk_part_iter_next(&piter))) { piter 794 block/genhd.c disk_part_iter_exit(&piter); piter 953 block/genhd.c struct disk_part_iter piter; piter 971 block/genhd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); piter 972 block/genhd.c while ((part = disk_part_iter_next(&piter))) { piter 989 block/genhd.c disk_part_iter_exit(&piter); piter 1054 block/genhd.c struct disk_part_iter piter; piter 1066 block/genhd.c disk_part_iter_init(&piter, sgp, DISK_PITER_INCL_PART0); piter 1067 block/genhd.c while ((part = disk_part_iter_next(&piter))) piter 1072 block/genhd.c disk_part_iter_exit(&piter); piter 1368 block/genhd.c struct disk_part_iter piter; piter 1381 block/genhd.c disk_part_iter_init(&piter, gp, DISK_PITER_INCL_EMPTY_PART0); piter 1382 block/genhd.c while ((hd = disk_part_iter_next(&piter))) { piter 1408 block/genhd.c disk_part_iter_exit(&piter); piter 1579 block/genhd.c struct disk_part_iter piter; piter 1587 block/genhd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY); piter 1588 block/genhd.c while ((part = disk_part_iter_next(&piter))) piter 1590 block/genhd.c disk_part_iter_exit(&piter); piter 21 block/ioctl.c struct disk_part_iter piter; piter 56 block/ioctl.c disk_part_iter_init(&piter, disk, piter 58 block/ioctl.c while ((part = disk_part_iter_next(&piter))) { piter 61 block/ioctl.c disk_part_iter_exit(&piter); piter 66 block/ioctl.c disk_part_iter_exit(&piter); piter 130 block/ioctl.c disk_part_iter_init(&piter, disk, piter 132 block/ioctl.c while ((lpart = disk_part_iter_next(&piter))) { piter 137 block/ioctl.c disk_part_iter_exit(&piter); piter 145 block/ioctl.c disk_part_iter_exit(&piter); piter 444 block/partition-generic.c struct disk_part_iter piter; piter 454 block/partition-generic.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY); piter 455 block/partition-generic.c while ((part = disk_part_iter_next(&piter))) piter 457 block/partition-generic.c disk_part_iter_exit(&piter); piter 2498 drivers/mmc/host/dw_mmc.c host->sg = sg_miter->piter.sg; piter 2553 drivers/mmc/host/dw_mmc.c host->sg = sg_miter->piter.sg; piter 434 drivers/s390/block/dasd.c struct disk_part_iter piter; piter 446 drivers/s390/block/dasd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); piter 447 drivers/s390/block/dasd.c while ((part = disk_part_iter_next(&piter))) piter 449 drivers/s390/block/dasd.c disk_part_iter_exit(&piter); piter 461 drivers/s390/block/dasd.c struct disk_part_iter piter; piter 473 drivers/s390/block/dasd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); piter 474 drivers/s390/block/dasd.c while ((part = disk_part_iter_next(&piter))) piter 476 drivers/s390/block/dasd.c disk_part_iter_exit(&piter); piter 2825 drivers/scsi/scsi_debug.c struct sg_mapping_iter piter; piter 2830 drivers/scsi/scsi_debug.c sg_miter_start(&piter, scsi_prot_sglist(SCpnt), piter 2837 drivers/scsi/scsi_debug.c while (sg_miter_next(&piter)) { piter 2844 drivers/scsi/scsi_debug.c for (ppage_offset = 0; ppage_offset < piter.length; piter 2857 drivers/scsi/scsi_debug.c sdt = piter.addr + ppage_offset; piter 2873 drivers/scsi/scsi_debug.c sg_miter_stop(&piter); piter 2883 drivers/scsi/scsi_debug.c sg_miter_stop(&piter); piter 117 drivers/staging/android/ion/ion_heap.c struct sg_page_iter piter; piter 120 drivers/staging/android/ion/ion_heap.c for_each_sg_page(sgl, &piter, nents, 0) { piter 121 drivers/staging/android/ion/ion_heap.c pages[p++] = sg_page_iter_page(&piter); piter 536 drivers/target/target_core_sbc.c m.piter.sg->offset + block_size); piter 540 drivers/target/target_core_sbc.c m.piter.sg->offset); piter 150 drivers/usb/storage/protocol.c if (*offset + len < miter.piter.sg->length) { piter 152 drivers/usb/storage/protocol.c *sgptr = miter.piter.sg; piter 155 drivers/usb/storage/protocol.c *sgptr = sg_next(miter.piter.sg); piter 282 include/linux/genhd.h extern void disk_part_iter_init(struct disk_part_iter *piter, piter 284 include/linux/genhd.h extern struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter); piter 285 include/linux/genhd.h extern void disk_part_iter_exit(struct disk_part_iter *piter); piter 373 include/linux/scatterlist.h bool __sg_page_iter_next(struct sg_page_iter *piter); piter 375 include/linux/scatterlist.h void __sg_page_iter_start(struct sg_page_iter *piter, piter 382 include/linux/scatterlist.h static inline struct page *sg_page_iter_page(struct sg_page_iter *piter) piter 384 include/linux/scatterlist.h return nth_page(sg_page(piter->sg), piter->sg_pgoffset); piter 408 include/linux/scatterlist.h #define for_each_sg_page(sglist, piter, nents, pgoffset) \ piter 409 include/linux/scatterlist.h for (__sg_page_iter_start((piter), (sglist), (nents), (pgoffset)); \ piter 410 include/linux/scatterlist.h __sg_page_iter_next(piter);) piter 453 include/linux/scatterlist.h struct sg_page_iter piter; /* page iterator */ piter 600 lib/scatterlist.c void __sg_page_iter_start(struct sg_page_iter *piter, piter 604 lib/scatterlist.c piter->__pg_advance = 0; piter 605 lib/scatterlist.c piter->__nents = nents; piter 607 lib/scatterlist.c piter->sg = sglist; piter 608 lib/scatterlist.c piter->sg_pgoffset = pgoffset; piter 617 lib/scatterlist.c bool __sg_page_iter_next(struct sg_page_iter *piter) piter 619 lib/scatterlist.c if (!piter->__nents || !piter->sg) piter 622 lib/scatterlist.c piter->sg_pgoffset += piter->__pg_advance; piter 623 lib/scatterlist.c piter->__pg_advance = 1; piter 625 lib/scatterlist.c while (piter->sg_pgoffset >= sg_page_count(piter->sg)) { piter 626 lib/scatterlist.c piter->sg_pgoffset -= sg_page_count(piter->sg); piter 627 lib/scatterlist.c piter->sg = sg_next(piter->sg); piter 628 lib/scatterlist.c if (!--piter->__nents || !piter->sg) piter 643 lib/scatterlist.c struct sg_page_iter *piter = &dma_iter->base; piter 645 lib/scatterlist.c if (!piter->__nents || !piter->sg) piter 648 lib/scatterlist.c piter->sg_pgoffset += piter->__pg_advance; piter 649 lib/scatterlist.c piter->__pg_advance = 1; piter 651 lib/scatterlist.c while (piter->sg_pgoffset >= sg_dma_page_count(piter->sg)) { piter 652 lib/scatterlist.c piter->sg_pgoffset -= sg_dma_page_count(piter->sg); piter 653 lib/scatterlist.c piter->sg = sg_next(piter->sg); piter 654 lib/scatterlist.c if (!--piter->__nents || !piter->sg) piter 679 lib/scatterlist.c __sg_page_iter_start(&miter->piter, sgl, nents, 0); piter 690 lib/scatterlist.c if (!__sg_page_iter_next(&miter->piter)) piter 693 lib/scatterlist.c sg = miter->piter.sg; piter 695 lib/scatterlist.c miter->__offset = miter->piter.sg_pgoffset ? 0 : sg->offset; piter 696 lib/scatterlist.c miter->piter.sg_pgoffset += miter->__offset >> PAGE_SHIFT; piter 699 lib/scatterlist.c (miter->piter.sg_pgoffset << PAGE_SHIFT) - piter 774 lib/scatterlist.c miter->page = sg_page_iter_page(&miter->piter);