Function report |
Source Code:mm\huge_memory.c |
Create Date:2022-07-28 16:02:21 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr, pgprot_t newprot, int prot_numa)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct vm_area_struct * | vma | |
pmd_t * | pmd | |
unsigned long | addr | |
pgprot_t | newprot | |
int | prot_numa |
1935 | If Not ptl Then Return 0 |
1938 | preserve_write = prot_numa && pmd_write( * pmd) |
1939 | ret = 1 |
1967 | If prot_numa && is_huge_zero_pmd( * pmd) Then Go to unlock |
1970 | If prot_numa && pmd_protnone( * pmd) Then Go to unlock |
1994 | entry = pmdp_invalidate(vma, addr, pmd) |
1996 | entry = pmd_modify(entry, newprot) |
1997 | If preserve_write Then entry = 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 | spin_unlock(ptl) |
2004 | Return ret |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |