Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-28 14:41:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:remap_pmd_range

Proto:static inline int remap_pmd_range(struct mm_struct *mm, pud_t *pud, unsigned long addr, unsigned long end, unsigned long pfn, pgprot_t prot)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
pud_t *pud
unsigned longaddr
unsigned longend
unsigned longpfn
pgprot_tprot
1843  pfn -= addr >> PAGE_SHIFT determines the page size
1844  pmd = pmd_alloc(mm, pud, addr)
1845  If Not pmd Then Return -ENOMEM
1847  VM_BUG_ON(pmd_trans_huge( * pmd))
1848  Do
1849  next = pmd_addr_end(addr, end)
1850  err = maps a range of physical memory into the requested pages. the old* mappings are removed. any references to nonexistent pages results* in null mappings (currently treated as "copy-on-access")
1852  If err Then Return err
1854  When pmd++, addr = next , addr != end cycle
1855  Return 0
Caller
NameDescribe
remap_pud_range