Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:debug_dma_alloc_coherent

Proto:void debug_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t dma_addr, void *virt)

Type:void

Parameter:

TypeParameterName
struct device *dev
size_tsize
dma_addr_tdma_addr
void *virt
1436  If Value for the false possibility is greater at compile time(dma_debug_disabled()) Then Return
1439  If Value for the false possibility is greater at compile time(virt == NULL) Then Return
1443  If Not 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. && Not virt_addr_valid(virt) Then Return
1446  entry = struct dma_entry allocator* The next two functions implement the allocator for* struct dma_debug_entries.
1447  If Not entry Then Return
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  If 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. Then pfn = vmalloc_to_pfn(virt)
1459  Else 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.