函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-27 16:08:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:vmf_insert_pfn_prot - insert single pfn into user vma with specified pgprot*@vma: user vma to map to*@addr: target user address of this page*@pfn: source kernel pfn*@pgprot: pgprot flags for the inserted page* This is exactly like vmf_insert_pfn(), except

函数原型:vm_fault_t vmf_insert_pfn_prot(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, pgprot_t pgprot)

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
unsigned longpfn
pgprot_tpgprot
1679  BUG_ON(!(Flags, see mm.h. & (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages )))
1680  BUG_ON((Flags, see mm.h. & (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages )) == (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages ))
1682  BUG_ON((Flags, see mm.h. & Page-ranges managed without "struct page", just pure PFN ) && is_cow_mapping(Flags, see mm.h. ))
1683  BUG_ON((Flags, see mm.h. & Can contain "struct page" and pure PFN pages ) && pfn_valid(pfn))
1685  如果addr小于Our start address within vm_mm. addr大于等于The first byte after our end addresswithin vm_mm. 则返回:VM_FAULT_SIGBUS
1688  如果非pfn_modify_allowed(pfn, pgprot)则返回:VM_FAULT_SIGBUS
1691  track_pfn_insert(vma, & pgprot, __pfn_to_pfn_t(pfn, PFN_DEV))
1693  返回:insert_pfn(vma, addr, __pfn_to_pfn_t(pfn, PFN_DEV), pgprot, false)
调用者
名称描述
vmf_insert_pfnvmf_insert_pfn - insert single pfn into user vma*@vma: user vma to map to*@addr: target user address of this page*@pfn: source kernel pfn* Similar to vm_insert_page, this allows drivers to insert individual pages* they've allocated into a user vma