Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__thp_get_unmapped_area

Proto:static unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, loff_t off, unsigned long flags, unsigned long size)

Type:unsigned long

Parameter:

TypeParameterName
struct file *filp
unsigned longaddr
unsigned longlen
loff_toff
unsigned longflags
unsigned longsize
526  off_end = off + len
527  off_align = und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(off, size)
530  If off_end <= off_align || off_end - off_align < size Then Return 0
533  len_pad = len + size
534  If len_pad < len || off + len_pad < off Then Return 0
537  ret = get_unmapped_area(filp, addr, len_pad, off >> PAGE_SHIFT determines the page size , flags)
544  If IS_ERR_VALUE(ret) Then Return 0
551  If ret == addr Then Return addr
554  ret += off - ret & size - 1
555  Return ret
Caller
NameDescribe
thp_get_unmapped_area