函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memblock_alloc_range_nid - allocate boot memory block*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@start: the lower bound of the memory region to allocate (phys address)*@end: the upper bound of

函数原型:static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size, phys_addr_t align, phys_addr_t start, phys_addr_t end, int nid, bool exact_nid)

返回类型:phys_addr_t

参数:

类型参数名称
phys_addr_tsize
phys_addr_talign
phys_addr_tstart
phys_addr_tend
intnid
boolexact_nid
1345  flags等于choose_memblock_flags()
1348  如果WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n")则nid等于NUMA_NO_NODE
1351  如果非align
1353  dump_stack()
1354  align等于SMP_CACHE_BYTES
1357  again :
1358  found等于memblock_find_in_range_node(size, align, start, end, nid, flags)
1360  如果found且非memblock_reserve(found, size)则转到:done
1363  如果nid不等于NUMA_NO_NODE且非exact_nid
1364  found等于memblock_find_in_range_node(size, align, start, end, NUMA_NO_NODE, flags)
1367  如果found且非memblock_reserve(found, size)则转到:done
1371  如果flags按位与mirrored region
1372  flags与等于mirrored region 的反
1373  打印警告信息("Could not allocate %pap bytes of mirrored memory\n", & size)
1375  转到:again
1378  返回:0
1380  done :
1382  如果end不等于MEMBLOCK_ALLOC_KASANkmemleak_alloc_phys(found, size, 0, 0)
1391  返回:found
调用者
名称描述
memblock_phys_alloc_rangememblock_phys_alloc_range - allocate a memory block inside specified range*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@start: the lower bound of the memory region to allocate (physical
memblock_phys_alloc_try_nidmemblock_phys_alloc_try_nid - allocate a memory block from specified MUMA node*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@nid: nid of the free area to find, %NUMA_NO_NODE for any node
memblock_alloc_internalmemblock_alloc_internal - allocate boot memory block*@size: size of memory block to be allocated in bytes*@align: alignment of the region and block's size*@min_addr: the lower bound of the memory region to allocate (phys address)*@max_addr: the upper