函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\amd_gart_64.c Create Date:2022-07-27 09:51:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Map multiple scatterlist entries continuous into the first.

函数原型:static int __dma_map_cont(struct device *dev, struct scatterlist *start, int nelems, struct scatterlist *sout, unsigned long pages)

返回类型:int

参数:

类型参数名称
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  如果iommu_start恒等于负1则返回:负1
339  phys_addr等于dma_address
341  BUG_ON(s != start && offset)
342  如果s恒等于start
343  dma_address等于GART remapping area (physical)
344  dma_address加等于iommu_pagePAGE_SIZEoffset
345  dma_length等于length
346  否则
347  dma_length加等于length
350  addr等于phys_addr
351  pages等于iommu_num_pages(offset, length, PAGE_SIZE)
352 pages自减循环
353  Remapping table [iommu_page]等于GPTE_ENCODE(addr)
354  addr加等于PAGE_SIZE
355  iommu_page自加
358  BUG_ON(iommu_page - iommu_start != pages)
360  返回:0
调用者
名称描述
dma_map_cont