函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\dma-mapping.h Create Date:2022-07-27 06:51:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:dma_map_resource

函数原型:static inline dma_addr_t dma_map_resource(struct device *dev, phys_addr_t phys_addr, size_t size, enum dma_data_direction dir, unsigned long attrs)

返回类型:dma_addr_t

参数:

类型参数名称
struct device *dev
phys_addr_tphys_addr
size_tsize
enum dma_data_directiondir
unsigned longattrs
346  ops等于get_dma_ops(dev)
347  addr等于DMA_MAPPING_ERROR
349  BUG_ON(!valid_dma_direction(dir))
352  如果WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr)))则返回:DMA_MAPPING_ERROR
355  如果dma_is_direct(ops)则addr等于dma_direct_map_resource(dev, phys_addr, size, dir, attrs)
357  否则如果map_resourceaddr等于map_resource(dev, phys_addr, size, dir, attrs)
360  debug_dma_map_resource(dev, phys_addr, size, dir, addr)
361  返回:addr