Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dma_direct_free_pages

Proto:void dma_direct_free_pages(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_addr, unsigned long attrs)

Type:void

Parameter:

TypeParameterName
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  If attrs & DMA_ATTR_NO_KERNEL_MAPPING: Lets the platform to avoid creating a kernel* virtual mapping for the allocated buffer. && Not force_dma_unencrypted(dev) Then
220  dma_free_contiguous(dev, cpu_addr, size)
221  Return
224  If 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)) Then Return
228  If force_dma_unencrypted(dev) Then set_memory_encrypted((unsignedlong)cpu_addr, 1 << page_order)
231  If 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. Then vunmap(cpu_addr)
234  dma_free_contiguous(dev, dma_direct_to_page(dev, dma_addr), size)
Caller
NameDescribe
gart_free_coherent a coherent mapping
dma_direct_free
gart_alloc_coherentallocate and map a coherent mapping