Home
last modified time | relevance | path

Searched refs:memblock (Results 1 – 25 of 37) sorted by relevance

12

/linux/tools/testing/memblock/tests/
H A Dbasic_api.c17 ASSERT_NE(memblock.memory.regions, NULL); in memblock_initialization_check()
18 ASSERT_EQ(memblock.memory.cnt, 0); in memblock_initialization_check()
19 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check()
20 ASSERT_EQ(strcmp(memblock.memory.name, "memory"), 0); in memblock_initialization_check()
22 ASSERT_NE(memblock.reserved.regions, NULL); in memblock_initialization_check()
23 ASSERT_EQ(memblock.reserved.cnt, 0); in memblock_initialization_check()
24 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check()
25 ASSERT_EQ(strcmp(memblock.reserved.name, "reserved"), 0); in memblock_initialization_check()
27 ASSERT_EQ(memblock.bottom_up, false); in memblock_initialization_check()
28 ASSERT_EQ(memblock.current_limit, MEMBLOCK_ALLOC_ANYWHERE); in memblock_initialization_check()
[all …]
H A Dalloc_nid_api.c66 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_top_down_simple_check()
91 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_nid_top_down_simple_check()
92 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_simple_check()
118 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_top_down_end_misaligned_check()
144 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_nid_top_down_end_misaligned_check()
145 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_end_misaligned_check()
169 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_exact_address_generic_check()
194 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_nid_exact_address_generic_check()
195 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_exact_address_generic_check()
221 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_top_down_narrow_range_check()
[all …]
H A Dalloc_exact_nid_api.c30 struct memblock_region *new_rgn = &memblock.reserved.regions[0]; in alloc_exact_nid_top_down_numa_simple_check()
31 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_simple_check()
56 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_exact_nid_top_down_numa_simple_check()
57 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_exact_nid_top_down_numa_simple_check()
82 struct memblock_region *new_rgn = &memblock.reserved.regions[1]; in alloc_exact_nid_top_down_numa_part_reserved_check()
83 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_part_reserved_check()
112 ASSERT_EQ(memblock.reserved.cnt, 2); in alloc_exact_nid_top_down_numa_part_reserved_check()
113 ASSERT_EQ(memblock.reserved.total_size, size + r1.size); in alloc_exact_nid_top_down_numa_part_reserved_check()
143 struct memblock_region *new_rgn = &memblock.reserved.regions[0]; in alloc_exact_nid_top_down_numa_split_range_low_check()
144 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_split_range_low_check()
[all …]
H A Dalloc_helpers_api.c20 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_from_simple_generic_check()
38 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_from_simple_generic_check()
39 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_from_simple_generic_check()
63 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_from_misaligned_generic_check()
82 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_from_misaligned_generic_check()
83 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_from_misaligned_generic_check()
110 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_from_top_down_high_addr_check()
127 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_from_top_down_high_addr_check()
128 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_from_top_down_high_addr_check()
153 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_from_top_down_no_space_above_check()
[all …]
H A Dalloc_api.c26 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_top_down_simple_check()
44 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_top_down_simple_check()
45 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_top_down_simple_check()
73 struct memblock_region *rgn1 = &memblock.reserved.regions[1]; in alloc_top_down_disjoint_check()
74 struct memblock_region *rgn2 = &memblock.reserved.regions[0]; in alloc_top_down_disjoint_check()
105 ASSERT_EQ(memblock.reserved.cnt, 2); in alloc_top_down_disjoint_check()
106 ASSERT_EQ(memblock.reserved.total_size, total_size); in alloc_top_down_disjoint_check()
125 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_top_down_before_check()
147 ASSERT_EQ(memblock.reserved.cnt, 1); in alloc_top_down_before_check()
148 ASSERT_EQ(memblock.reserved.total_size, total_size); in alloc_top_down_before_check()
[all …]
H A Dcommon.c41 memset(memblock.memory.regions, 0, in reset_memblock_regions()
42 memblock.memory.cnt * sizeof(struct memblock_region)); in reset_memblock_regions()
43 memblock.memory.cnt = 0; in reset_memblock_regions()
44 memblock.memory.max = INIT_MEMBLOCK_REGIONS; in reset_memblock_regions()
45 memblock.memory.total_size = 0; in reset_memblock_regions()
47 memset(memblock.reserved.regions, 0, in reset_memblock_regions()
48 memblock.reserved.cnt * sizeof(struct memblock_region)); in reset_memblock_regions()
49 memblock.reserved.cnt = 0; in reset_memblock_regions()
50 memblock.reserved.max = INIT_MEMBLOCK_RESERVED_REGIONS; in reset_memblock_regions()
51 memblock.reserved.total_size = 0; in reset_memblock_regions()
[all …]
/linux/tools/testing/memblock/
H A DMakefile11 DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o cmdline.o
13 EXTR_SRC = ../../../mm/memblock.c
27 include: ../../../include/linux/memblock.h ../../include/linux/*.h \
31 test -L linux/memblock.h || ln -s ../../../../include/linux/memblock.h linux/memblock.h
35 memblock.c: $(EXTR_SRC)
36 test -L memblock.c || ln -s $(EXTR_SRC) memblock.c
39 $(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/asm.h asm/cmpxchg.h
H A DREADME14 difficult. This test suite, usually referred as memblock simulator, is
15 an attempt at testing the memblock mechanism. It runs one monolithic test that
17 allocation functionalities of memblock. The main data structure of the boot time
22 As this project uses the actual memblock code and has to run in user space,
24 introduced memblock simulator (commit 16802e55dea9 ("memblock tests: Add
25 skeleton of the memblock simulator")) and a few preparation commits just
61 memblock
72 | |-- common.(c|h) -- helper functions for resetting memblock;
83 memblock to track valid memory ranges. To achieve this, the test suite registers
84 with memblock memory stored by test_memory struct. It is a small wrapper that
[all …]
H A D.gitignore2 memblock.c
3 linux/memblock.h
/linux/mm/
H A Dmemblock.c115 struct memblock memblock __initdata_memblock = {
142 static __refdata struct memblock_type *memblock_memory = &memblock.memory;
298 end = memblock.current_limit; in memblock_find_in_range_node()
371 if (memblock.reserved.regions != memblock_reserved_init_regions) { in memblock_discard()
372 addr = __pa(memblock.reserved.regions); in memblock_discard()
374 memblock.reserved.max); in memblock_discard()
376 kfree(memblock.reserved.regions); in memblock_discard()
381 if (memblock.memory.regions != memblock_memory_init_regions) { in memblock_discard()
382 addr = __pa(memblock.memory.regions); in memblock_discard()
384 memblock.memory.max); in memblock_discard()
[all …]
H A DMakefile69 obj-y += memblock.o
/linux/include/linux/
H A Dmemblock.h94 struct memblock { struct
101 extern struct memblock memblock; argument
225 __for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \
237 __for_each_mem_range_rev(i, &memblock.memory, NULL, NUMA_NO_NODE, \
251 __for_each_mem_range(i, &memblock.reserved, NULL, NUMA_NO_NODE, \
334 __for_each_mem_range(i, &memblock.memory, &memblock.reserved, \
351 __for_each_mem_range_rev(i, &memblock.memory, &memblock.reserved, \
455 memblock.bottom_up = enable; in memblock_set_bottom_up()
465 return memblock.bottom_up; in memblock_bottom_up()
552 for (region = memblock.memory.regions; \
[all …]
/linux/Documentation/translations/zh_CN/core-api/
H A Dboot-time-mm.rst22 一个叫做 ``memblock`` 的专用分配器执行启动时的内存管理。特定架构的初始化
36 mm/memblock.c
42 下面是关于memblock数据结构、函数和宏的描述。其中一些实际上是内部的,但由于
48 include/linux/memblock.h
49 mm/memblock.c
/linux/Documentation/core-api/
H A Dboot-time-mm.rst10 A specialized allocator called ``memblock`` performs the
26 .. kernel-doc:: mm/memblock.c
27 :doc: memblock overview
33 Here is the description of memblock data structures, functions and
39 .. kernel-doc:: include/linux/memblock.h
40 .. kernel-doc:: mm/memblock.c
/linux/arch/microblaze/mm/
H A Dinit.c158 memblock.memory.regions[0].size = memory_size; in mm_cmdline_setup()
196 if ((u32) memblock.memory.regions[0].size < 0x400000) { in mmu_init()
201 if ((u32) memblock.memory.regions[0].size < kernel_tlb) { in mmu_init()
207 memory_start = (u32) memblock.memory.regions[0].base; in mmu_init()
208 lowmem_size = memory_size = (u32) memblock.memory.regions[0].size; in mmu_init()
/linux/arch/loongarch/kernel/
H A Dmem.c61 memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0); in memblock_init()
62 memblock_set_node(0, PHYS_ADDR_MAX, &memblock.reserved, 0); in memblock_init()
/linux/arch/arm/mm/
H A Dpmsa-v8.c248 add_range(mem, ARRAY_SIZE(mem), 0, memblock.memory.regions[0].base, in pmsav8_setup()
249 memblock.memory.regions[0].base + memblock.memory.regions[0].size); in pmsav8_setup()
/linux/drivers/infiniband/core/
H A Duverbs_ioctl.c513 struct bundle_alloc_head *memblock; in bundle_destroy() local
550 for (memblock = pbundle->allocated_mem; memblock;) { in bundle_destroy()
551 struct bundle_alloc_head *tmp = memblock; in bundle_destroy()
553 memblock = memblock->next; in bundle_destroy()
/linux/arch/riscv/kernel/
H A Dsetup.c146 num_resources = memblock.memory.cnt + memblock.reserved.cnt + 1; in init_resources()
/linux/arch/powerpc/include/asm/
H A Dfadump-internal.h20 #define memblock_num_regions(memblock_type) (memblock.memblock_type.cnt)
/linux/arch/s390/kernel/
H A Dsetup.c629 if (memblock.memory.regions[0].size < crash_size) { in reserve_crashkernel()
675 (unsigned long)memblock.memory.total_size >> 20); in reserve_crashkernel()
733 memblock_set_node(0, ULONG_MAX, &memblock.memory, 0); in memblock_add_physmem_info()
/linux/Documentation/ABI/testing/
H A Dppc-memtrace15 aligned to the memblock size. This amount of RAM will be removed
/linux/arch/mips/loongson64/
H A Dinit.c108 &memblock.reserved, node); in szmem()
/linux/arch/sh/kernel/
H A Dsetup.c236 &memblock.memory, nid); in __add_active_range()
/linux/arch/arm64/kernel/
H A Dsetup.c219 num_standard_resources = memblock.memory.cnt; in request_standard_resources()

12