Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs)

Type:pgprot_t

Parameter:

TypeParameterName
struct device *dev
pgprot_tprot
unsigned longattrs
157  If 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. Then Return prot
165  Return 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)
Caller
NameDescribe
dma_common_mmapCreate userspace mapping for the DMA-coherent memory.
dma_direct_alloc_pages
dma_direct_mmap