Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__apply_to_page_range

Proto:static int __apply_to_page_range(struct mm_struct *mm, unsigned long addr, unsigned long size, pte_fn_t fn, void *data, bool create)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
unsigned longaddr
unsigned longsize
pte_fn_tfn
void *data
boolcreate
2150  end = addr + size
2151  err = 0
2153  If WARN_ON(addr >= end) Then Return -EINVAL
2156  pgd = a shortcut to get a pgd_t in a given mm(mm, addr)
2157  Do
2158  next = When walking page tables, get the address of the next boundary,* or the end address of the range if that comes earlier. Although no* vma end wraps to 0, rounded up __boundary may wrap to 0 throughout.(addr, end)
2159  If Not create && pgd_none_or_clear_bad(pgd) Then Continue
2161  err = apply_to_p4d_range(mm, pgd, addr, next, fn, data, create)
2162  If err Then Break
2164  When pgd++, addr = next , addr != end cycle
2166  Return err
Caller
NameDescribe
apply_to_page_rangeScan a region of virtual memory, filling in page tables as necessary* and calling a provided function on each leaf page table.
apply_to_existing_page_rangeScan a region of virtual memory, calling a provided function on* each leaf page table where it exists.* Unlike apply_to_page_range, this does _not_ fill in page tables* where they are absent.