Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto: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)

Type:phys_addr_t

Parameter:

TypeParameterName
phys_addr_tsize
phys_addr_talign
phys_addr_tstart
phys_addr_tend
intnid
boolexact_nid
1345  flags = choose_memblock_flags()
1348  If WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n") Then nid = NUMA_NO_NODE
1351  If Not align Then
1353  dump_stack()
1354  align = SMP_CACHE_BYTES
1357  again :
1358  found = memblock_find_in_range_node(size, align, start, end, nid, flags)
1360  If found && Not memblock_reserve(found, size) Then Go to done
1363  If nid != NUMA_NO_NODE && Not exact_nid Then
1364  found = memblock_find_in_range_node(size, align, start, end, NUMA_NO_NODE, flags)
1367  If found && Not memblock_reserve(found, size) Then Go to done
1371  If flags & mirrored region Then
1372  flags &= ~mirrored region
1373  pr_warn("Could not allocate %pap bytes of mirrored memory\n", & size)
1375  Go to again
1378  Return 0
1380  done :
1382  If end != MEMBLOCK_ALLOC_KASAN Then kmemleak_alloc_phys(found, size, 0, 0)
1391  Return found
Caller
NameDescribe
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