Function report | 
Source Code:mm\memory.c | 
Create Date:2022-07-28 14:41:27 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:map_pfn_range - remap kernel memory to userspace*@vma: user vma to map to*@addr: target user address to start at*@pfn: physical address of kernel memory*@size: size of map area*@prot: page protection flags for this mapping
Proto:int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, unsigned long size, pgprot_t prot)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct vm_area_struct * | vma | |
| unsigned long | addr | |
| unsigned long | pfn | |
| unsigned long | size | |
| pgprot_t | prot | 
| 1919 | end = addr + align the pointer to the (next) page boundary (size) | 
| 1942 | If is_cow_mapping(Flags, see mm.h. ) Then | 
| 1943 | If addr != Our start address within vm_mm. || end != The first byte after our end addresswithin vm_mm. Then Return -EINVAL | 
| 1948 | err = track_pfn_remap(vma, & prot, remap_pfn, addr, align the pointer to the (next) page boundary (size)) | 
| 1952 | Flags, see mm.h. |= Memory mapped I/O or similar | Page-ranges managed without "struct page", just pure PFN | Cannot expand with mremap() | Do not include in the core dump | 
| 1955 | pfn -= addr >> PAGE_SHIFT determines the page size | 
| 1956 | pgd = a shortcut to get a pgd_t in a given mm(mm, addr) | 
| 1957 | flush_cache_range(vma, addr, end) | 
| 1958 | Do | 
| 1960 | err = remap_p4d_range(mm, pgd, addr, next, pfn + (addr >> PAGE_SHIFT determines the page size ), prot) | 
| 1962 | If err Then Break | 
| 1966 | If err Then untrack_pfn(vma, remap_pfn, align the pointer to the (next) page boundary (size)) | 
| 1969 | Return err | 
| Name | Describe | 
|---|---|
| dma_direct_mmap | |
| __dma_mmap_from_coherent | 
| 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  |