函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return the page attributes used for mapping dma_alloc_* memory, either in* kernel space if remapping is needed, or to userspace through dma_mmap_*.

函数原型:pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs)

返回类型:pgprot_t

参数:

类型参数名称
struct device *dev
pgprot_tprot
unsigned longattrs
157  如果dev_is_dma_coherent(dev)或IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_DMA_NONCOHERENT_CACHE_SYNC)且attrs按位与DMA_ATTR_NON_CONSISTENT: Lets the platform to choose to return either* consistent or non-consistent memory as it sees fit.则返回:prot
165  返回:Page protection so that devices that can't snoop CPU caches can use the* memory coherently. We default to pgprot_noncached which is usually used* for ioremap as a safe bet, but architectures can override this with less* strict semantics if possible.(prot)
调用者
名称描述
dma_common_mmapCreate userspace mapping for the DMA-coherent memory.
dma_direct_alloc_pages
dma_direct_mmap