函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:struct page *dma_alloc_contiguous(struct device *dev, size_t size, gfp_t gfp)

返回类型:struct page

参数:

类型参数名称
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  如果devcma_areacma等于cma_area
240  否则如果count大于1则cma等于dma_contiguous_default_area
244  如果cmagfpflags_allow_blocking(gfp)则
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  返回:page