函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\swiotlb.c Create Date:2022-07-27 11:35:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:swiotlb_init_with_tbl

函数原型:int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)

返回类型:int

参数:

类型参数名称
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  如果非This is a free list describing the number of free entries available from* each indexpanic - 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  如果非io_tlb_orig_addrpanic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
228 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.循环
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  如果verboseswiotlb_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  返回:0
调用者
名称描述
swiotlb_initStatically reserve bounce buffer space and initialize bounce buffer data* structures for the software IO TLB used to implement the DMA API.