Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\amd_gart_64.c Create Date:2022-07-28 08:52:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Fallback for dma_map_sg in case of overflow

Proto:static int dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg, int nents, int dir)

Type:int

Parameter:

TypeParameterName
struct device *dev
struct scatterlist *sg
intnents
intdir
304  addr = sg_phys - Return physical address of an sg entry*@sg: SG entry* Description:* This calls page_to_phys() on the page in this sg entry, and adds the* sg offset. The caller must know that it is legal to call page_to_phys()* on the sg page.
306  If nonforced_iommu(dev, addr, length) Then
307  addr = Map a single continuous physical area into the IOMMU.* Caller needs to check if the iommu is needed and flush.
308  If addr == DMA_MAPPING_ERROR Then
311  nents = 0
312  dma_length = 0
313  Break
316  dma_address = addr
317  dma_length = length
319  Use global flush state to avoid races with multiple flushers.
321  Return nents
Caller
NameDescribe
gart_map_sgDMA map all entries in a scatterlist.* Merge chunks that have page aligned sizes into a continuous mapping.