函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__vm_insert_mixed

函数原型:static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, pfn_t pfn, bool mkwrite)

返回类型:vm_fault_t

参数:

类型参数名称
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  如果addr小于Our start address within vm_mm. addr大于等于The first byte after our end addresswithin vm_mm. 则返回:VM_FAULT_SIGBUS
1750  track_pfn_insert(vma, & pgprot, pfn)
1752  如果非pfn_modify_allowed(pfn_t_to_pfn(pfn), pgprot)则返回:VM_FAULT_SIGBUS
1762  如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_ARCH_HAS_PTE_SPECIAL)且非pfn_t_devmap(pfn)且pfn_t_valid(pfn)则
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  否则
1774  返回:insert_pfn(vma, addr, pfn, pgprot, mkwrite)
1777  如果err恒等于负ENOMEM则返回:VM_FAULT_OOM
1779  如果err小于0且err不等于负EBUSY则返回:VM_FAULT_SIGBUS
1782  返回:VM_FAULT_NOPAGE
调用者
名称描述
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.