Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__next_mem_range_rev

Proto:void __attribute__((__section__(".meminit.text"))) __attribute__((__cold__)) __attribute__((__no_instrument_function__))__next_mem_range_rev(u64 *idx, int nid, enum memblock_flags flags, struct memblock_type *type_a, struct memblock_type *type_b, phys_addr_t *out_start, phys_addr_t *out_end, int *out_nid)

Type:void

Parameter:

TypeParameterName
u64 *idx
intnid
enum memblock_flagsflags
struct memblock_type *type_a
struct memblock_type *type_b
phys_addr_t *out_start
phys_addr_t *out_end
int *out_nid
1114  idx_a = idx & 0xffffffff
1115  idx_b = idx >> 32
1117  If WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n") Then nid = NUMA_NO_NODE
1120  If idx == ULLONG_MAX Then
1121  idx_a = cnt - 1
1122  If (type_b != NULL) Then idx_b = cnt
1124  Else idx_b = 0
1128  When idx_a >= 0 cycle
1129  m = regions[idx_a]
1131  m_start = base
1132  m_end = base + size
1133  m_nid = memblock_get_region_node(m)
1135  If should_skip_region(m, nid, flags) Then Continue
1138  If Not type_b Then
1139  If out_start Then out_start = m_start
1141  If out_end Then out_end = m_end
1143  If out_nid Then out_nid = m_nid
1145  idx_a--
1146  idx = idx_a | idx_b << 32
1147  Return
1151  When idx_b >= 0 cycle
1156  r = regions[idx_b]
1157  r_start = If idx_b Then base + size Else 0
1158  r_end = If idx_b < cnt Then base Else PHYS_ADDR_MAX
1165  If r_end <= m_start Then Break
1168  If m_end > r_start Then
1185  idx = ULLONG_MAX