Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\swiotlb.c Create Date:2022-07-28 10:36:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:swiotlb_tbl_sync_single

Proto:void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, size_t size, enum dma_data_direction dir, enum dma_sync_target target)

Type:void

Parameter:

TypeParameterName
struct device *hwdev
phys_addr_ttlb_addr
size_tsize
enum dma_data_directiondir
enum dma_sync_targettarget
631  index = tlb_addr - Used to do a quick range check in swiotlb_tbl_unmap_single and* swiotlb_tbl_sync_single_*, to see if the memory was in fact allocated by this* API. >> log of the size of each IO TLB slab. The number of slabs is command line* controllable.
632  orig_addr = io_tlb_orig_addr[index]
634  If orig_addr == We need to save away the original address corresponding to a mapped entry* for the sync operations. Then Return
636  orig_addr += tlb_addr & (1 << log of the size of each IO TLB slab. The number of slabs is command line* controllable.) - 1
639  Case target == SYNC_FOR_CPU
640  If Value is more likely to compile time(dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) Then Bounce: copy the swiotlb buffer from or back to the original dma location
643  Else BUG_ON(dir != DMA_TO_DEVICE)
645  Break
646  Case target == SYNC_FOR_DEVICE
647  If Value is more likely to compile time(dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL) Then Bounce: copy the swiotlb buffer from or back to the original dma location
650  Else BUG_ON(dir != DMA_FROM_DEVICE)
652  Break
653  Default
654  BUG()