Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__vm_insert_mixed

Proto:static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, pfn_t pfn, bool mkwrite)

Type:vm_fault_t

Parameter:

TypeParameterName
struct vm_area_struct *vma
unsigned longaddr
pfn_tpfn
boolmkwrite
1742  pgprot = Access permissions of this VMA.
1745  BUG_ON(!vm_mixed_ok(vma, pfn))
1747  If addr < Our start address within vm_mm. || addr >= The first byte after our end addresswithin vm_mm. Then Return VM_FAULT_SIGBUS
1750  track_pfn_insert(vma, & pgprot, pfn)
1752  If Not pfn_modify_allowed(pfn_t_to_pfn(pfn), pgprot) Then Return VM_FAULT_SIGBUS
1762  If Not IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_ARCH_HAS_PTE_SPECIAL) && Not pfn_t_devmap(pfn) && pfn_t_valid(pfn) Then
1771  page = pfn_to_page(pfn_t_to_pfn(pfn))
1772  err = This is the old fallback for page remapping.* For historical reasons, it only allows reserved pages. Only* old drivers should use this, and they needed to mark their* pages reserved for the old functions anyway.
1773  Else
1774  Return insert_pfn(vma, addr, pfn, pgprot, mkwrite)
1777  If err == -ENOMEM Then Return VM_FAULT_OOM
1779  If err < 0 && err != -EBUSY Then Return VM_FAULT_SIGBUS
1782  Return VM_FAULT_NOPAGE
Caller
NameDescribe
vmf_insert_mixed
vmf_insert_mixed_mkwriteIf the insertion of PTE failed because someone else already added a* different entry in the mean time, we treat that as success as we assume* the same entry was actually inserted.