Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:vm_fault_t vmf_insert_pfn_prot(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, pgprot_t pgprot)

Type:vm_fault_t

Parameter:

TypeParameterName
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  If addr < Our start address within vm_mm. || addr >= The first byte after our end addresswithin vm_mm. Then Return VM_FAULT_SIGBUS
1688  If Not pfn_modify_allowed(pfn, pgprot) Then Return VM_FAULT_SIGBUS
1691  track_pfn_insert(vma, & pgprot, __pfn_to_pfn_t(pfn, PFN_DEV))
1693  Return insert_pfn(vma, addr, __pfn_to_pfn_t(pfn, PFN_DEV), pgprot, false)
Caller
NameDescribe
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