函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dma_direct_free_pages

函数原型:void dma_direct_free_pages(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_addr, unsigned long attrs)

返回类型:void

参数:

类型参数名称
struct device *dev
size_tsize
void *cpu_addr
dma_addr_tdma_addr
unsigned longattrs
215  page_order等于get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory
217  如果attrs按位与DMA_ATTR_NO_KERNEL_MAPPING: Lets the platform to avoid creating a kernel* virtual mapping for the allocated buffer.且非force_dma_unencrypted(dev)则
220  dma_free_contiguous(dev, cpu_addr, size)
221  返回
224  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_DMA_DIRECT_REMAP)且dma_free_from_pool(cpu_addr, align the pointer to the (next) page boundary (size))则返回
228  如果force_dma_unencrypted(dev)则set_memory_encrypted((unsignedlong)cpu_addr, 1 << page_order)
231  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_DMA_REMAP)且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.vunmap(cpu_addr)
234  dma_free_contiguous(dev, dma_direct_to_page(dev, dma_addr), size)
调用者
名称描述
gart_free_coherent a coherent mapping
dma_direct_free
gart_alloc_coherentallocate and map a coherent mapping