函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns* - 0 if PMD could not be locked* - 1 if PMD was locked but protections unchange and TLB flush unnecessary* - HPAGE_PMD_NR is protections changed and TLB flush necessary

函数原型:int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr, pgprot_t newprot, int prot_numa)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
pmd_t *pmd
unsigned longaddr
pgprot_tnewprot
intprot_numa
1928  mm等于The address space we belong to.
1934  ptl等于Returns page table lock pointer if a given pmd maps a thp, NULL otherwise.* Note that if it returns page table lock pointer, this routine returns without* unlocking page table lock. So callers must unlock it.
1935  如果非ptl则返回:0
1938  preserve_write等于prot_numapmd_write( * pmd)
1939  ret等于1
1967  如果prot_numais_huge_zero_pmd( * pmd)则转到:unlock
1970  如果prot_numapmd_protnone( * pmd)则转到:unlock
1994  entry等于pmdp_invalidate(vma, addr, pmd)
1996  entry等于pmd_modify(entry, newprot)
1997  如果preserve_writeentry等于pmd_mk_savedwrite(entry)
1999  ret等于HPAGE_PMD_NR
2000  set_pmd_at(mm, addr, pmd, entry)
2001  BUG_ON(vma_is_anonymous(vma) && !preserve_write && pmd_write(entry))
2002  unlock :
2003  自旋锁解锁
2004  返回:ret
调用者
名称描述
change_pmd_range