函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__dma_direct_alloc_pages

函数原型:struct page *__dma_direct_alloc_pages(struct device *dev, size_t size, gfp_t gfp, unsigned long attrs)

返回类型:struct page

参数:

类型参数名称
struct device *dev
size_tsize
gfp_tgfp
unsigned longattrs
93  alloc_size等于 align the pointer to the (next) page boundary (size)
94  node等于dev_to_node(dev)
95  struct page * page = NULL
98  如果attrs按位与DMA_ATTR_NO_WARN: This tells the DMA-mapping subsystem to suppress* allocation failure reports (similarly to __GFP_NOWARN).gfp或等于DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.
102  gfp与等于__GFP_ZERO的反
103  gfp或等于__dma_direct_optimal_gfp_mask(dev, Like dma_mask, but for alloc_coherent mappings as not all hardware supports 64 bit addresses for consistent allocations such descriptors. , & phys_limit)
105  page等于Use fallback alloc() and free() when CONFIG_DMA_CMA=n
106  如果page且非dma_coherent_ok(dev, Change "struct page" to physical address.(page), size)则
107  dma_free_contiguous(dev, page, alloc_size)
108  page = NULL
110  again :
111  如果非pagepage等于Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online.
113  如果page且非dma_coherent_ok(dev, Change "struct page" to physical address.(page), size)则
114  dma_free_contiguous(dev, page, size)
115  page = NULL
120  gfp或等于GFP_DMA32
121  转到:again
125  gfp等于gfp按位与GFP_DMA32的反按位或GFP_DMA
126  转到:again
130  返回:page
调用者
名称描述
dma_direct_alloc_pages