函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__follow_pte_pmd

函数原型:static int __follow_pte_pmd(struct mm_struct *mm, unsigned long address, struct mmu_notifier_range *range, pte_t **ptepp, pmd_t **pmdpp, spinlock_t **ptlp)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
unsigned longaddress
struct mmu_notifier_range *range
pte_t **ptepp
pmd_t **pmdpp
spinlock_t **ptlp
4291  pgd等于a shortcut to get a pgd_t in a given mm(mm, address)
4292  如果The "pgd_xxx()" functions here are trivial for a folded two-level* setup: the p4d is never bad, and a p4d always exists (as it's folded* into the pgd entry)此条件成立可能性小(为编译器优化)(pgd_bad( * pgd))则转到:out
4295  p4d等于p4d_offset(pgd, address)
4296  如果The "p4d_xxx()" functions here are trivial for a folded two-level* setup: the pud is never bad, and a pud always exists (as it's folded* into the p4d entry)此条件成立可能性小(为编译器优化)(p4d_bad( * p4d))则转到:out
4299  pud等于pud_offset(p4d, address)
4300  如果The "pud_xxx()" functions here are trivial for a folded two-level* setup: the pmd is never bad, and a pmd always exists (as it's folded* into the pud entry)此条件成立可能性小(为编译器优化)(pud_bad( * pud))则转到:out
4303  pmd等于pmd_offset(pud, address)
4304  VM_BUG_ON(pmd_trans_huge( * pmd))
4306  如果pmd_huge( * pmd)则
4307  如果非pmdpp则转到:out
4310  如果range
4316  ptlp等于pmd_lock(mm, pmd)
4317  如果pmd_huge( * pmd)则
4318  pmdpp等于pmd
4319  返回:0
4321  自旋锁解锁
4322  如果rangemmu_notifier_invalidate_range_end(range)
4326  如果pmd_none( * pmd)或此条件成立可能性小(为编译器优化)(pmd_bad( * pmd))则转到:out
4329  如果range
4330  mmu_notifier_range_init(range, MMU_NOTIFY_CLEAR, 0, NULL, mm, address & PAGE_MASK, (address & PAGE_MASK) + PAGE_SIZE)
4333  mmu_notifier_invalidate_range_start(range)
4335  ptep等于pte_offset_map_lock(mm, pmd, address, ptlp)
4336  如果非pte_present( * ptep)则转到:unlock
4338  ptepp等于ptep
4339  返回:0
4340  unlock :
4341  pte_unmap_unlock(ptep, * ptlp)
4342  如果rangemmu_notifier_invalidate_range_end(range)
4344  out :
4345  返回:负EINVAL
调用者
名称描述
follow_pte
follow_pte_pmd