• Home
  • Raw
  • Download

Lines Matching refs:sg

417 	struct scatterlist *sg;  in dma_direct_sync_sg_for_device()  local
420 for_each_sg(sgl, sg, nents, i) { in dma_direct_sync_sg_for_device()
421 phys_addr_t paddr = dma_to_phys(dev, sg_dma_address(sg)); in dma_direct_sync_sg_for_device()
424 swiotlb_sync_single_for_device(dev, paddr, sg->length, in dma_direct_sync_sg_for_device()
428 arch_sync_dma_for_device(paddr, sg->length, in dma_direct_sync_sg_for_device()
440 struct scatterlist *sg; in dma_direct_sync_sg_for_cpu() local
443 for_each_sg(sgl, sg, nents, i) { in dma_direct_sync_sg_for_cpu()
444 phys_addr_t paddr = dma_to_phys(dev, sg_dma_address(sg)); in dma_direct_sync_sg_for_cpu()
447 arch_sync_dma_for_cpu(paddr, sg->length, dir); in dma_direct_sync_sg_for_cpu()
450 swiotlb_sync_single_for_cpu(dev, paddr, sg->length, in dma_direct_sync_sg_for_cpu()
454 arch_dma_mark_clean(paddr, sg->length); in dma_direct_sync_sg_for_cpu()
468 struct scatterlist *sg; in dma_direct_unmap_sg() local
471 for_each_sg(sgl, sg, nents, i) { in dma_direct_unmap_sg()
472 if (sg_is_dma_bus_address(sg)) in dma_direct_unmap_sg()
473 sg_dma_unmark_bus_address(sg); in dma_direct_unmap_sg()
475 dma_direct_unmap_page(dev, sg->dma_address, in dma_direct_unmap_sg()
476 sg_dma_len(sg), dir, attrs); in dma_direct_unmap_sg()
486 struct scatterlist *sg; in dma_direct_map_sg() local
489 for_each_sg(sgl, sg, nents, i) { in dma_direct_map_sg()
490 if (is_pci_p2pdma_page(sg_page(sg))) { in dma_direct_map_sg()
491 map = pci_p2pdma_map_segment(&p2pdma_state, dev, sg); in dma_direct_map_sg()
509 sg->dma_address = dma_direct_map_page(dev, sg_page(sg), in dma_direct_map_sg()
510 sg->offset, sg->length, dir, attrs); in dma_direct_map_sg()
511 if (sg->dma_address == DMA_MAPPING_ERROR) { in dma_direct_map_sg()
515 sg_dma_len(sg) = sg->length; in dma_direct_map_sg()