函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:debug_dma_sync_sg_for_cpu

函数原型:void debug_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, int direction)

返回类型:void

参数:

类型参数名称
struct device *dev
struct scatterlist *sg
intnelems
intdirection
1578  mapped_ents等于0
1580  如果此条件成立可能性小(为编译器优化)(dma_debug_disabled())则返回
1585  struct dma_debug_entry ref = {type = dma_debug_sg, dev = dev, pfn = page_to_pfn(sg_page(s)), offset = offset, dev_addr = These macros should be used after a dma_map_sg call has been done* to get bus addresses of each of the SG entries and their lengths(s), size = sg_dma_len(s), direction = direction, sg_call_ents = nelems, }
1596  如果非imapped_ents等于get_nr_mapped_entries(dev, & ref)
1599  如果i大于等于mapped_ents退出
1602  check_sync(dev, & ref, true)