函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memblock.c Create Date:2022-07-27 16:40:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:memblock_isolate_range

函数原型: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)

返回类型:int

参数:

类型参数名称
struct memblock_type *type
phys_addr_tbase
phys_addr_tsize
int *start_rgn
int *end_rgn
723  end等于baseadjust *@size so that (@base + *@size) doesn't overflow, return new size
727  start_rgn等于end_rgn等于0
729  如果非size则返回:0
733 cnt加2大于max循环
734  如果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则返回:负ENOMEM
738  rbase等于base
739  rend等于rbasesize
741  如果rbase大于等于end退出
743  如果rend小于等于base则继续下一循环
746  如果rbase小于base
751  base等于base
752  size减等于baserbase
753  total_size减等于baserbase
754  memblock_insert_region(type, idx, rbase, base - rbase, memblock_get_region_node(rgn), flags)
757  否则如果rend大于end
762  base等于end
763  size减等于endrbase
764  total_size减等于endrbase
765  memblock_insert_region(type, idx--, rbase, end - rbase, memblock_get_region_node(rgn), flags)
768  否则
770  如果非end_rgnstart_rgn等于idx
772  end_rgn等于idx加1
776  返回:0
调用者
名称描述
memblock_remove_range
memblock_setclr_flag
memblock_cap_memory_range