Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dma_direct_map_page

Proto:dma_addr_t dma_direct_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, unsigned long attrs)

Type:dma_addr_t

Parameter:

TypeParameterName
struct device *dev
struct page *page
unsigned longoffset
size_tsize
enum dma_data_directiondir
unsigned longattrs
371  phys = Change "struct page" to physical address.(page) + offset
372  dma_addr = If memory encryption is supported, phys_to_dma will set the memory encryption* bit in the DMA address, and dma_to_phys will clear it. The raw __phys_to_dma* and __dma_to_phys versions should only be used on non-encrypted memory for
374  If Value for the false possibility is greater at compile time(!dma_direct_possible(dev, dma_addr, size)) && Not swiotlb_map(dev, & phys, & dma_addr, size, dir, attrs) Then
376  report_addr(dev, dma_addr, size)
377  Return DMA_MAPPING_ERROR
380  If Not dev_is_dma_coherent(dev) && Not (attrs & DMA_ATTR_SKIP_CPU_SYNC: Allows platform code to skip synchronization of* the CPU cache for the given buffer assuming that it has been already* transferred to 'device' domain.) Then arch_sync_dma_for_device(phys, size, dir)
382  Return dma_addr
Caller
NameDescribe
dma_direct_map_sg
dma_map_page_attrs