/linux-6.6.21/tools/testing/memblock/tests/ |
D | basic_api.c | 17 ASSERT_NE(memblock.memory.regions, NULL); in memblock_initialization_check() 18 ASSERT_EQ(memblock.memory.cnt, 1); 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, 1); 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 …]
|
D | alloc_nid_api.c | 66 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 …]
|
D | alloc_exact_nid_api.c | 30 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 …]
|
D | alloc_helpers_api.c | 20 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 …]
|
D | alloc_api.c | 26 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 …]
|
D | common.c | 41 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 = 1; 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 = 1; 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-6.6.21/tools/testing/memblock/ |
D | Makefile | 11 DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.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
|
D | README | 14 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 …]
|
D | .gitignore | 2 memblock.c 3 linux/memblock.h
|
/linux-6.6.21/mm/ |
D | memblock.c | 115 struct memblock memblock __initdata_memblock = { 145 static __refdata struct memblock_type *memblock_memory = &memblock.memory; 301 end = memblock.current_limit; in memblock_find_in_range_node() 375 if (memblock.reserved.regions != memblock_reserved_init_regions) { in memblock_discard() 376 addr = __pa(memblock.reserved.regions); in memblock_discard() 378 memblock.reserved.max); in memblock_discard() 380 kfree(memblock.reserved.regions); in memblock_discard() 385 if (memblock.memory.regions != memblock_memory_init_regions) { in memblock_discard() 386 addr = __pa(memblock.memory.regions); in memblock_discard() 388 memblock.memory.max); in memblock_discard() [all …]
|
/linux-6.6.21/include/linux/ |
D | memblock.h | 91 struct memblock { struct 98 extern struct memblock memblock; argument 220 __for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \ 232 __for_each_mem_range_rev(i, &memblock.memory, NULL, NUMA_NO_NODE, \ 246 __for_each_mem_range(i, &memblock.reserved, NULL, NUMA_NO_NODE, \ 345 __for_each_mem_range(i, &memblock.memory, &memblock.reserved, \ 362 __for_each_mem_range_rev(i, &memblock.memory, &memblock.reserved, \ 466 memblock.bottom_up = enable; in memblock_set_bottom_up() 476 return memblock.bottom_up; in memblock_bottom_up() 562 for (region = memblock.memory.regions; \ [all …]
|
/linux-6.6.21/Documentation/translations/zh_CN/core-api/ |
D | boot-time-mm.rst | 22 一个叫做 ``memblock`` 的专用分配器执行启动时的内存管理。特定架构的初始化 36 mm/memblock.c 42 下面是关于memblock数据结构、函数和宏的描述。其中一些实际上是内部的,但由于 48 include/linux/memblock.h 49 mm/memblock.c
|
/linux-6.6.21/Documentation/core-api/ |
D | boot-time-mm.rst | 10 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-6.6.21/arch/microblaze/mm/ |
D | init.c | 158 memblock.memory.regions[0].size = memory_size; in mm_cmdline_setup() 196 if (!memblock.reserved.cnt) { in mmu_init() 201 if ((u32) memblock.memory.regions[0].size < 0x400000) { in mmu_init() 206 if ((u32) memblock.memory.regions[0].size < kernel_tlb) { in mmu_init() 212 memory_start = (u32) memblock.memory.regions[0].base; in mmu_init() 213 lowmem_size = memory_size = (u32) memblock.memory.regions[0].size; in mmu_init()
|
/linux-6.6.21/arch/loongarch/kernel/ |
D | mem.c | 61 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-6.6.21/arch/arm/mm/ |
D | pmsa-v8.c | 248 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-6.6.21/drivers/infiniband/core/ |
D | uverbs_ioctl.c | 504 struct bundle_alloc_head *memblock; in bundle_destroy() local 542 for (memblock = pbundle->allocated_mem; memblock;) { in bundle_destroy() 543 struct bundle_alloc_head *tmp = memblock; in bundle_destroy() 545 memblock = memblock->next; in bundle_destroy()
|
/linux-6.6.21/arch/x86/mm/ |
D | numa.c | 250 if (!memblock_overlaps_region(&memblock.memory, in numa_cleanup_meminfo() 510 ret = memblock_set_node(mb->start, mb->end - mb->start, &memblock.reserved, mb->nid); in numa_clear_kernel_node_hotplug() 561 &memblock.memory, mb->nid); in numa_register_memblks() 645 WARN_ON(memblock_set_node(0, ULLONG_MAX, &memblock.memory, in numa_init() 647 WARN_ON(memblock_set_node(0, ULLONG_MAX, &memblock.reserved, in numa_init()
|
/linux-6.6.21/arch/riscv/kernel/ |
D | setup.c | 159 num_resources = memblock.memory.cnt + memblock.reserved.cnt + 1; in init_resources()
|
/linux-6.6.21/arch/powerpc/include/asm/ |
D | fadump-internal.h | 20 #define memblock_num_regions(memblock_type) (memblock.memblock_type.cnt)
|
/linux-6.6.21/arch/s390/kernel/ |
D | setup.c | 636 if (memblock.memory.regions[0].size < crash_size) { in reserve_crashkernel() 682 (unsigned long)memblock.memory.total_size >> 20); in reserve_crashkernel() 740 memblock_set_node(0, ULONG_MAX, &memblock.memory, 0); in memblock_add_physmem_info()
|
/linux-6.6.21/Documentation/ABI/testing/ |
D | ppc-memtrace | 15 aligned to the memblock size. This amount of RAM will be removed
|
/linux-6.6.21/arch/powerpc/mm/ |
D | numa.c | 891 memblock_set_node(base, sz, &memblock.memory, nid); in numa_setup_drmem_lmb() 1007 memblock_set_node(start, size, &memblock.memory, nid); in parse_numa_properties() 1042 &memblock.memory, nid); in setup_nonnuma()
|
D | mem.c | 179 memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0); in mem_topology_setup()
|
/linux-6.6.21/arch/sh/kernel/ |
D | setup.c | 241 &memblock.memory, nid); in __add_active_range()
|