函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:follow_devmap_pmd

函数原型:struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, int flags, struct dev_pagemap **pgmap)

返回类型:struct page

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
pmd_t *pmd
intflags
struct dev_pagemap **pgmap
938  pfn等于pmd_pfn( * pmd)
939  mm等于The address space we belong to.
942  assert_spin_locked(pmd_lockptr(mm, pmd))
948  WARN_ONCE(flags & rnal GUP flag , "mm: In follow_devmap_pmd with FOLL_COW set")
950  如果flags按位与check pte is writable 且非pmd_write( * pmd)则返回:NULL
953  如果pmd_present( * pmd)且pmd_devmap( * pmd)则否则
956  返回:NULL
958  如果flags按位与mark page accessed touch_pmd(vma, addr, pmd, flags)
965  如果非flags按位与do get_page on page 的值则返回:错误号
968  pfn加等于addr按位与PMD_MASK的反的值右移PAGE_SHIFT determines the page size
969  pgmap等于get_dev_pagemap(pfn, * pgmap)
970  如果非pgmap则返回:错误号
972  page等于pfn_to_page(pfn)
973  get_page(page)
975  返回:page
调用者
名称描述
follow_pmd_mask