Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dma_alloc_contiguous() - allocate contiguous pages*@dev: Pointer to device for which the allocation is performed

Proto:struct page *dma_alloc_contiguous(struct device *dev, size_t size, gfp_t gfp)

Type:struct page

Parameter:

TypeParameterName
struct device *dev
size_tsize
gfp_tgfp
234  count = size >> PAGE_SHIFT determines the page size
235  struct page * page = NULL
236  struct cma * cma = NULL
238  If dev && cma_area Then cma = cma_area
240  Else if count > 1 Then cma = dma_contiguous_default_area
244  If cma && gfpflags_allow_blocking(gfp) Then
245  align = 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
246  cma_align = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, align, CONFIG_CMA_ALIGNMENT)
248  page = ma_alloc() - allocate pages from contiguous area*@cma: Contiguous memory region for which the allocation is performed
251  Return page