Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:memblock_isolate_range

Proto:static int __attribute__((__section__(".meminit.text"))) __attribute__((__cold__)) __attribute__((__no_instrument_function__))memblock_isolate_range(struct memblock_type *type, phys_addr_t base, phys_addr_t size, int *start_rgn, int *end_rgn)

Type:int

Parameter:

TypeParameterName
struct memblock_type *type
phys_addr_tbase
phys_addr_tsize
int *start_rgn
int *end_rgn
723  end = base + adjust *@size so that (@base + *@size) doesn't overflow, return new size
727  start_rgn = end_rgn = 0
729  If Not size Then Return 0
733  When cnt + 2 > max cycle
734  If memblock_double_array - double the size of the memblock regions array*@type: memblock type of the regions array being doubled*@new_area_start: starting address of memory range to avoid overlap with*@new_area_size: size of memory range to avoid overlap with < 0 Then Return -ENOMEM
738  rbase = base
739  rend = rbase + size
741  If rbase >= end Then Break
743  If rend <= base Then Continue
746  If rbase < base Then
751  base = base
752  size -= base - rbase
753  total_size -= base - rbase
754  memblock_insert_region(type, idx, rbase, base - rbase, memblock_get_region_node(rgn), flags)
757  Else if rend > end Then
762  base = end
763  size -= end - rbase
764  total_size -= end - rbase
765  memblock_insert_region(type, idx--, rbase, end - rbase, memblock_get_region_node(rgn), flags)
768  Else
770  If Not end_rgn Then start_rgn = idx
772  end_rgn = idx + 1
776  Return 0
Caller
NameDescribe
memblock_remove_range
memblock_setclr_flag
memblock_cap_memory_range