函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dma_direct_map_sg

函数原型:int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs)

返回类型:int

参数:

类型参数名称
struct device *dev
struct scatterlist *sgl
intnents
enum dma_data_directiondir
unsigned longattrs
393  dma_address等于dma_direct_map_page(dev, sg_page(sg), offset, length, dir, attrs)
395  如果dma_address恒等于DMA_MAPPING_ERROR则转到:out_unmap
397  sg_dma_len(sg)等于length
400  返回:nents
402  out_unmap :
403  dma_direct_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC: Allows platform code to skip synchronization of* the CPU cache for the given buffer assuming that it has been already* transferred to 'device' domain.)
404  返回:0
调用者
名称描述
dma_map_sg_attrsdma_maps_sg_attrs returns 0 on error and > 0 on success.* It should never return a value < 0.