Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\debug.c Create Date:2022-07-28 10:35:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:debug_dma_map_sg

Proto:void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, int mapped_ents, int direction)

Type:void

Parameter:

TypeParameterName
struct device *dev
struct scatterlist *sg
intnents
intmapped_ents
intdirection
1348  If Value for the false possibility is greater at compile time(dma_debug_disabled()) Then Return
1352  entry = struct dma_entry allocator* The next two functions implement the allocator for* struct dma_debug_entries.
1353  If Not entry Then Return
1356  type = dma_debug_sg
1357  dev = dev
1358  pfn = page_to_pfn(sg_page(s))
1359  offset = offset , size = sg_dma_len(s)
1361  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)
1362  direction = direction
1363  sg_call_ents = nents
1364  sg_mapped_ents = mapped_ents
1366  check_for_stack(dev, sg_page(s), offset)
1368  If Not PageHighMem(sg_page(s)) Then
1369  check_for_illegal_area(dev, sg_virt - Return virtual address of an sg entry*@sg: SG entry* Description:* This calls page_address() on the page in this sg entry, and adds the* sg offset. The caller must know that the sg page has a valid virtual* mapping., sg_dma_len(s))
1372  check_sg_segment(dev, s)
1374  Wrapper function for adding an entry to the hash.* This function takes care of locking itself.