函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:debug_dma_alloc_coherent

函数原型:void debug_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t dma_addr, void *virt)

返回类型:void

参数:

类型参数名称
struct device *dev
size_tsize
dma_addr_tdma_addr
void *virt
1436  如果此条件成立可能性小(为编译器优化)(dma_debug_disabled())则返回
1439  如果此条件成立可能性小(为编译器优化)(virt == NULL)则返回
1443  如果非Determine if an address is within the vmalloc range* On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there* is no special casing required.且非virt_addr_valid(virt)则返回
1446  entry等于struct dma_entry allocator* The next two functions implement the allocator for* struct dma_debug_entries.
1447  如果非entry则返回
1450  type等于dma_debug_coherent
1451  dev等于dev
1452  offset等于offset_in_page(virt)
1453  size等于size
1454  dev_addr等于dma_addr
1455  direction等于DMA_BIDIRECTIONAL
1457  如果Determine if an address is within the vmalloc range* On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there* is no special casing required.pfn等于vmalloc_to_pfn(virt)
1459  否则pfn等于page_to_pfn(virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(virt))
1462  Wrapper function for adding an entry to the hash.* This function takes care of locking itself.