Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swiotlb_init_with_tbl

Proto:int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)

Type:int

Parameter:

TypeParameterName
char *tlb
unsigned longnslabs
intverbose
205  bytes = nslabs << log of the size of each IO TLB slab. The number of slabs is command line* controllable.
207  The number of IO TLB blocks (in groups of 64) between io_tlb_start and* io_tlb_end. This is command line adjustable via setup_io_tlb_npages. = nslabs
208  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. = __pa(tlb)
209  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. = 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. + bytes
216  alloc_size = align the pointer to the (next) page boundary (The number of IO TLB blocks (in groups of 64) between io_tlb_start and* io_tlb_end. This is command line adjustable via setup_io_tlb_npages. * sizeof(int))
217  This is a free list describing the number of free entries available from* each index = memblock_alloc(alloc_size, PAGE_SIZE)
218  If Not This is a free list describing the number of free entries available from* each index Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
222  alloc_size = align the pointer to the (next) page boundary (The number of IO TLB blocks (in groups of 64) between io_tlb_start and* io_tlb_end. This is command line adjustable via setup_io_tlb_npages. * sizeof(phys_addr_t))
223  io_tlb_orig_addr = memblock_alloc(alloc_size, PAGE_SIZE)
224  If Not io_tlb_orig_addr Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
228  When i < The number of IO TLB blocks (in groups of 64) between io_tlb_start and* io_tlb_end. This is command line adjustable via setup_io_tlb_npages. cycle
229  This is a free list describing the number of free entries available from* each index[i] = Maximum allowable number of contiguous slabs to map,* must be a power of 2. What is the appropriate value ?* The complexity of {map,unmap}_single is linearly dependent on this value. - OFFSET(i, Maximum allowable number of contiguous slabs to map,* must be a power of 2. What is the appropriate value ?* The complexity of {map,unmap}_single is linearly dependent on this value.)
230  io_tlb_orig_addr[i] = We need to save away the original address corresponding to a mapped entry* for the sync operations.
232  io_tlb_index = 0
234  If verbose Then swiotlb_print_info()
237  swiotlb_set_max_segment(The number of IO TLB blocks (in groups of 64) between io_tlb_start and* io_tlb_end. This is command line adjustable via setup_io_tlb_npages. << log of the size of each IO TLB slab. The number of slabs is command line* controllable.)
238  Return 0
Caller
NameDescribe
swiotlb_initStatically reserve bounce buffer space and initialize bounce buffer data* structures for the software IO TLB used to implement the DMA API.