函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memblock_find_in_range_node

函数原型:static phys_addr_t __attribute__((__section__(".meminit.text"))) __attribute__((__cold__)) __attribute__((__no_instrument_function__))memblock_find_in_range_node(phys_addr_t size, phys_addr_t align, phys_addr_t start, phys_addr_t end, int nid, enum memblock_flags flags)

返回类型:phys_addr_t

参数:

类型参数名称
phys_addr_tsize
phys_addr_talign
phys_addr_tstart
phys_addr_tend
intnid
enum memblock_flagsflags
275  如果end恒等于MEMBLOCK_ALLOC_ACCESSIBLEend恒等于MEMBLOCK_ALLOC_KASANend等于current_limit
280  start等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(phys_addr_t, start, PAGE_SIZE)
281  end等于两数取大(start, end)
282  kernel_end等于We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(_end)
288  如果Check if the allocation direction is bottom-up or not.* if this is true, that said, memblock will allocate memory* in bottom-up direction.end大于kernel_end
292  bottom_up_start等于两数取大(start, kernel_end)
295  ret等于__memblock_find_range_bottom_up(bottom_up_start, end, size, align, nid, flags)
297  如果ret则返回:ret
310  WARN_ONCE(IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_MEMORY_HOTREMOVE), "memblock: bottom-up allocation failed, memory hotremove may be affected\n")
314  返回:__memblock_find_range_top_down(start, end, size, align, nid, flags)
调用者
名称描述
memblock_find_in_range
memblock_alloc_range_nidmemblock_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