Function report | 
Source Code:kernel\dma\direct.c | 
Create Date:2022-07-28 10:33:19 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:dma_direct_mmap
Proto:int dma_direct_mmap(struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size, unsigned long attrs)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct device * | dev | |
| struct vm_area_struct * | vma | |
| void * | cpu_addr | |
| dma_addr_t | dma_addr | |
| size_t | size | |
| unsigned long | attrs | 
| 446 | user_count = vma_pages(vma) | 
| 447 | count = align the pointer to the (next) page boundary (size) >> PAGE_SHIFT determines the page size | 
| 448 | pfn = PHYS_PFN(dma_to_phys(dev, dma_addr)) | 
| 451 | Access permissions of this VMA. = Return the page attributes used for mapping dma_alloc_* memory, either in* kernel space if remapping is needed, or to userspace through dma_mmap_*. | 
| 456 | If Offset (within vm_file) in PAGE_SIZEunits >= count || user_count > count - Offset (within vm_file) in PAGE_SIZEunits Then Return -ENXIO | 
| Name | Describe | 
|---|---|
| dma_mmap_attrs | dma_mmap_attrs - map a coherent DMA allocation into user space*@dev: valid struct device pointer, or NULL for ISA and EISA-like devices*@vma: vm_area_struct describing requested user mapping*@cpu_addr: kernel CPU-view address returned from | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |