Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lean_record_pte - Clean a pte and record its address space offset in a* bitmap*@pte: Pointer to the pte*@addr: The virtual page address*@walk: pagetable walk callback argument* The function cleans a pte and records the range in

Proto:static int clean_record_pte(pte_t *pte, unsigned long addr, unsigned long end, struct mm_walk *walk)

Type:int

Parameter:

TypeParameterName
pte_t *pte
unsigned longaddr
unsigned longend
struct mm_walk *walk
89  wpwalk = private
90  cwalk = to_clean_walk(wpwalk)
91  ptent = pte
93  If The following only work if pte_present() is true.* Undefined behaviour if not.. Then
94  pgoff = ( addr - Our start address within vm_mm. >> PAGE_SHIFT determines the page size ) + Offset (within vm_file) in PAGE_SIZEunits - bitmap_pgoff
96  old_pte = Start a pte protection read-modify-write transaction, which* protects against asynchronous hardware modifications to the pte
98  ptent = pte_mkclean(old_pte)
99  Commit an update to a pte, leaving any hardware-controlled bits in* the PTE unmodified.
101  total++
102  tlbflush_start = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(tlbflush_start, addr)
103  tlbflush_end = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(tlbflush_end, addr + PAGE_SIZE)
106  __set_bit - Set a bit in memory*@nr: the bit to set*@addr: the address to start counting from* Unlike set_bit(), this function is non-atomic. If it is called on the same* region of memory concurrently, the effect may be that only one operation* succeeds.
107  start = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(start, pgoff)
108  end = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(end, pgoff + 1)
111  Return 0