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:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Map multiple scatterlist entries continuous into the first.

Proto:static int __dma_map_cont(struct device *dev, struct scatterlist *start, int nelems, struct scatterlist *sout, unsigned long pages)

Type:int

Parameter:

TypeParameterName
struct device *dev
struct scatterlist *start
intnelems
struct scatterlist *sout
unsigned longpages
329  iommu_start = alloc_iommu(dev, pages, 0)
330  iommu_page = iommu_start
334  If iommu_start == -1 Then Return -1
339  phys_addr = dma_address
341  BUG_ON(s != start && offset)
342  If s == start Then
343  dma_address = GART remapping area (physical)
344  dma_address += iommu_page * PAGE_SIZE + offset
345  dma_length = length
346  Else
347  dma_length += length
350  addr = phys_addr
351  pages = iommu_num_pages(offset, length, PAGE_SIZE)
352  When pages-- cycle
353  Remapping table [iommu_page] = GPTE_ENCODE(addr)
354  addr += PAGE_SIZE
355  iommu_page++
358  BUG_ON(iommu_page - iommu_start != pages)
360  Return 0
Caller
NameDescribe
dma_map_cont