Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__next_mem_range

Proto:void __attribute__((__section__(".meminit.text"))) __attribute__((__cold__)) __attribute__((__no_instrument_function__))__next_mem_range(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
1017  idx_a = idx & 0xffffffff
1018  idx_b = idx >> 32
1020  If WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n") Then nid = NUMA_NO_NODE
1024  When idx_a < cnt cycle
1025  m = regions[idx_a]
1027  m_start = base
1028  m_end = base + size
1029  m_nid = memblock_get_region_node(m)
1031  If should_skip_region(m, nid, flags) Then Continue
1034  If Not type_b Then
1035  If out_start Then out_start = m_start
1037  If out_end Then out_end = m_end
1039  If out_nid Then out_nid = m_nid
1041  idx_a++
1042  idx = idx_a | idx_b << 32
1043  Return
1047  When idx_b < cnt + 1 cycle
1052  r = regions[idx_b]
1053  r_start = If idx_b Then base + size Else 0
1054  r_end = If idx_b < cnt Then base Else PHYS_ADDR_MAX
1061  If r_start >= m_end Then Break
1064  If m_start < r_end Then
1087  idx = ULLONG_MAX