函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dma_direct_map_page

函数原型:dma_addr_t dma_direct_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, unsigned long attrs)

返回类型:dma_addr_t

参数:

类型参数名称
struct device *dev
struct page *page
unsigned longoffset
size_tsize
enum dma_data_directiondir
unsigned longattrs
371  phys等于Change "struct page" to physical address.(page)加offset
372  dma_addr等于If memory encryption is supported, phys_to_dma will set the memory encryption* bit in the DMA address, and dma_to_phys will clear it. The raw __phys_to_dma* and __dma_to_phys versions should only be used on non-encrypted memory for
374  如果此条件成立可能性小(为编译器优化)(!dma_direct_possible(dev, dma_addr, size))且非swiotlb_map(dev, & phys, & dma_addr, size, dir, attrs)则
376  report_addr(dev, dma_addr, size)
377  返回:DMA_MAPPING_ERROR
380  如果非dev_is_dma_coherent(dev)且非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.的值则arch_sync_dma_for_device(phys, size, dir)
382  返回:dma_addr
调用者
名称描述
dma_direct_map_sg
dma_map_page_attrs