Home
last modified time | relevance | path

Searched full:memblock (Results 1 – 25 of 369) sorted by relevance

12345678910>>...15

/linux/tools/testing/memblock/tests/
H A Dbasic_api.c4 #include <linux/memblock.h>
17 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()
[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_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.c30 "memblock function being tested, the name of the test,\n\t\t\t"
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 = 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()
[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 Dcommon.h9 #include <linux/memblock.h>
112 * Available memory registered with memblock needs to be valid for allocs
114 * dummy_physical_memory_init() that is later registered with memblock
/linux/tools/testing/memblock/
H A DMakefile3 # Memblock simulator requires AddressSanitizer (libasan) and liburcu development
11 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
42 @echo 'Memblock simulator'
45 @echo ' main - Build the memblock simulator'
H A DREADME2 Memblock simulator
8 Memblock is a boot time memory allocator[1] that manages memory regions before
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;
[all …]
H A D.gitignore2 memblock.c
3 linux/memblock.h
/linux/include/linux/
H A Dmemblock.h47 * either explictitly with memblock_reserve_kern() or via memblock
48 * allocation APIs. All memblock allocations set this flag.
99 * struct memblock - memblock allocator metadata
105 struct memblock { struct
112 extern struct memblock memblock; argument
202 * __for_each_mem_range - iterate through memblock areas from type_a and not
222 * __for_each_mem_range_rev - reverse iterate through memblock areas from
249 __for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \
254 * for_each_mem_range_rev - reverse iterate through memblock areas from
261 __for_each_mem_range_rev(i, &memblock.memory, NULL, NUMA_NO_NODE, \
[all …]
/linux/mm/
H A Dmemblock.c18 #include <linux/memblock.h>
43 * DOC: memblock overview
45 * Memblock is a method of managing memory regions during the early
49 * Memblock views the system memory as collections of contiguous
66 * wrapped with struct memblock. This structure is statically
76 * The early architecture setup should tell memblock what the physical
84 * Once memblock is setup the memory can be allocated using one of the
101 * memblock data structures (except "physmem") will be discarded after the
128 struct memblock memblock __initdata_memblock = {
150 * keep a pointer to &memblock.memory in the text section to use it in
[all …]
H A Dnuma_memblks.c6 #include <linux/memblock.h>
246 if (!memblock_overlaps_region(&memblock.memory, in numa_cleanup_meminfo()
330 * Mark all currently memblock-reserved physical memory (which covers the
340 * We have to do some preprocessing of memblock regions, to in numa_clear_kernel_node_hotplug()
343 * At this time, all memory regions reserved by memblock are in numa_clear_kernel_node_hotplug()
349 * set the nid in memblock.reserved. This will split up the in numa_clear_kernel_node_hotplug()
350 * memblock regions along node boundaries and will set the node IDs in numa_clear_kernel_node_hotplug()
358 &memblock.reserved, mb->nid); in numa_clear_kernel_node_hotplug()
363 * Now go over all reserved memblock regions, to construct a in numa_clear_kernel_node_hotplug()
367 * numa_meminfo might not include all memblock.reserved in numa_clear_kernel_node_hotplug()
[all …]
/linux/Documentation/core-api/
H A Dboot-time-mm.rst10 A specialized allocator called ``memblock`` performs the
21 Memblock also offers a variety of APIs that control its own behaviour.
23 Memblock Overview
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/Documentation/translations/zh_CN/core-api/
H A Dboot-time-mm.rst22 一个叫做 ``memblock`` 的专用分配器执行启动时的内存管理。特定架构的初始化
36 mm/memblock.c
48 include/linux/memblock.h
49 mm/memblock.c
/linux/Documentation/core-api/kho/bindings/memblock/
H A Dmemblock.yaml4 title: Memblock reserved memory
10 Memblock can serialize its current memory reservations created with
32 memblock {
33 compatible = "memblock-v1";
H A Dreserve-mem.yaml4 title: Memblock reserved memory regions
10 Memblock can serialize its current memory reservations created with
/linux/Documentation/core-api/kho/
H A Dfdt.rst55 memblock {
60 where the ``memblock`` node contains an FDT that is requested by the
61 subsystem memblock for preservation. The FDT contains the following
67 compatible = "memblock-v1";
/linux/arch/microblaze/mm/
H A Dinit.c11 #include <linux/memblock.h>
133 memblock.memory.regions[0].size = memory_size; in mm_cmdline_setup()
171 if ((u32) memblock.memory.regions[0].size < 0x400000) { in mmu_init()
176 if ((u32) memblock.memory.regions[0].size < kernel_tlb) { in mmu_init()
182 memory_start = (u32) memblock.memory.regions[0].base; in mmu_init()
183 lowmem_size = memory_size = (u32) memblock.memory.regions[0].size; in mmu_init()
/linux/arch/loongarch/kernel/
H A Dmem.c7 #include <linux/memblock.h>
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/arch/arm/mm/
H A Dpmsa-v8.c7 #include <linux/memblock.h>
114 * memblock auto merges contiguous blocks, remove in pmsav8_adjust_lowmem_bounds()
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/arch/mips/include/asm/
H A Ddmi.h6 #include <linux/memblock.h>
13 /* MIPS initialize DMI scan before SLAB is ready, so we use memblock here */
/linux/arch/arm/mach-realtek/
H A Drtd1195.c8 #include <linux/memblock.h>
17 pr_err("Failed to remove memblock %pa (%d)\n", &base, ret); in rtd1195_memblock_remove()
/linux/mm/kmsan/
H A Dinit.c14 #include <linux/memblock.h>
73 * Allocations via memblock can be only done before slab is initialized.
104 * Eager metadata allocation. When the memblock allocator is freeing pages to
200 * Memblock is about to go away. Split the page blocks left over in held_back[]
/linux/drivers/firmware/efi/
H A Defi-init.c16 #include <linux/memblock.h>
213 * means it is set aside initially. Don't add a memblock in reserve_regions()
263 * For memblock manipulation, the cap should come after the memblock_add(). in efi_init()
264 * And now, memblock is fully populated, it is time to do capping. in efi_init()

12345678910>>...15