Lines Matching refs:size
30 static inline void *run_memblock_alloc_nid(phys_addr_t size, in run_memblock_alloc_nid() argument
42 return memblock_alloc_exact_nid_raw(size, align, min_addr, in run_memblock_alloc_nid()
45 return memblock_alloc_try_nid_raw(size, align, min_addr, in run_memblock_alloc_nid()
47 return memblock_alloc_try_nid(size, align, min_addr, max_addr, nid); in run_memblock_alloc_nid()
68 phys_addr_t size = SZ_128; in alloc_nid_top_down_simple_check() local
79 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_simple_check()
82 rgn_end = rgn->base + rgn->size; in alloc_nid_top_down_simple_check()
85 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_simple_check()
87 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_simple_check()
88 ASSERT_EQ(rgn->base, max_addr - size); in alloc_nid_top_down_simple_check()
92 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_simple_check()
120 phys_addr_t size = SZ_128; in alloc_nid_top_down_end_misaligned_check() local
132 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_end_misaligned_check()
135 rgn_end = rgn->base + rgn->size; in alloc_nid_top_down_end_misaligned_check()
138 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_end_misaligned_check()
140 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_end_misaligned_check()
141 ASSERT_EQ(rgn->base, max_addr - size - misalign); in alloc_nid_top_down_end_misaligned_check()
145 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_end_misaligned_check()
171 phys_addr_t size = SZ_1K; in alloc_nid_exact_address_generic_check() local
180 max_addr = min_addr + size; in alloc_nid_exact_address_generic_check()
182 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_exact_address_generic_check()
185 rgn_end = rgn->base + rgn->size; in alloc_nid_exact_address_generic_check()
188 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_exact_address_generic_check()
190 ASSERT_EQ(rgn->size, size); in alloc_nid_exact_address_generic_check()
195 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_exact_address_generic_check()
223 phys_addr_t size = SZ_256; in alloc_nid_top_down_narrow_range_check() local
233 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_narrow_range_check()
238 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_narrow_range_check()
240 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_narrow_range_check()
241 ASSERT_EQ(rgn->base, max_addr - size); in alloc_nid_top_down_narrow_range_check()
244 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_narrow_range_check()
274 phys_addr_t size = SZ_1K; in alloc_nid_low_max_generic_check() local
284 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_low_max_generic_check()
336 ASSERT_EQ(rgn->size, total_size); in alloc_nid_min_reserved_generic_check()
386 ASSERT_EQ(rgn->size, total_size); in alloc_nid_max_reserved_generic_check()
430 r1.size = SMP_CACHE_BYTES; in alloc_nid_top_down_reserved_with_space_check()
432 r2.size = SZ_128; in alloc_nid_top_down_reserved_with_space_check()
433 r2.base = r1.base - (r3_size + gap_size + r2.size); in alloc_nid_top_down_reserved_with_space_check()
435 total_size = r1.size + r2.size + r3_size; in alloc_nid_top_down_reserved_with_space_check()
436 min_addr = r2.base + r2.size; in alloc_nid_top_down_reserved_with_space_check()
439 memblock_reserve(r1.base, r1.size); in alloc_nid_top_down_reserved_with_space_check()
440 memblock_reserve(r2.base, r2.size); in alloc_nid_top_down_reserved_with_space_check()
449 ASSERT_EQ(rgn1->size, r1.size + r3_size); in alloc_nid_top_down_reserved_with_space_check()
452 ASSERT_EQ(rgn2->size, r2.size); in alloc_nid_top_down_reserved_with_space_check()
493 r1.size = SMP_CACHE_BYTES; in alloc_nid_reserved_full_merge_generic_check()
495 r2.size = SZ_128; in alloc_nid_reserved_full_merge_generic_check()
496 r2.base = r1.base - (r3_size + r2.size); in alloc_nid_reserved_full_merge_generic_check()
498 total_size = r1.size + r2.size + r3_size; in alloc_nid_reserved_full_merge_generic_check()
499 min_addr = r2.base + r2.size; in alloc_nid_reserved_full_merge_generic_check()
502 memblock_reserve(r1.base, r1.size); in alloc_nid_reserved_full_merge_generic_check()
503 memblock_reserve(r2.base, r2.size); in alloc_nid_reserved_full_merge_generic_check()
512 ASSERT_EQ(rgn->size, total_size); in alloc_nid_reserved_full_merge_generic_check()
557 r1.size = SMP_CACHE_BYTES; in alloc_nid_top_down_reserved_no_space_check()
559 r2.size = SZ_128; in alloc_nid_top_down_reserved_no_space_check()
560 r2.base = r1.base - (r2.size + gap_size); in alloc_nid_top_down_reserved_no_space_check()
562 total_size = r1.size + r2.size + r3_size; in alloc_nid_top_down_reserved_no_space_check()
563 min_addr = r2.base + r2.size; in alloc_nid_top_down_reserved_no_space_check()
566 memblock_reserve(r1.base, r1.size); in alloc_nid_top_down_reserved_no_space_check()
567 memblock_reserve(r2.base, r2.size); in alloc_nid_top_down_reserved_no_space_check()
576 ASSERT_EQ(rgn1->size, r1.size); in alloc_nid_top_down_reserved_no_space_check()
579 ASSERT_EQ(rgn2->size, r2.size + r3_size); in alloc_nid_top_down_reserved_no_space_check()
623 r1.size = SMP_CACHE_BYTES; in alloc_nid_reserved_all_generic_check()
625 r2.size = MEM_SIZE - (r1.size + gap_size); in alloc_nid_reserved_all_generic_check()
628 min_addr = r2.base + r2.size; in alloc_nid_reserved_all_generic_check()
631 memblock_reserve(r1.base, r1.size); in alloc_nid_reserved_all_generic_check()
632 memblock_reserve(r2.base, r2.size); in alloc_nid_reserved_all_generic_check()
654 phys_addr_t size = SZ_256; in alloc_nid_top_down_cap_max_check() local
664 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_cap_max_check()
669 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_cap_max_check()
671 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_cap_max_check()
672 ASSERT_EQ(rgn->base, memblock_end_of_DRAM() - size); in alloc_nid_top_down_cap_max_check()
675 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_cap_max_check()
691 phys_addr_t size = SZ_1K; in alloc_nid_top_down_cap_min_check() local
701 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_cap_min_check()
706 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_cap_min_check()
708 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_cap_min_check()
709 ASSERT_EQ(rgn->base, memblock_end_of_DRAM() - size); in alloc_nid_top_down_cap_min_check()
712 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_cap_min_check()
737 phys_addr_t size = SZ_128; in alloc_nid_bottom_up_simple_check() local
748 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_simple_check()
751 rgn_end = rgn->base + rgn->size; in alloc_nid_bottom_up_simple_check()
754 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_simple_check()
756 ASSERT_EQ(rgn->size, size); in alloc_nid_bottom_up_simple_check()
761 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_simple_check()
789 phys_addr_t size = SZ_128; in alloc_nid_bottom_up_start_misaligned_check() local
801 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_start_misaligned_check()
804 rgn_end = rgn->base + rgn->size; in alloc_nid_bottom_up_start_misaligned_check()
807 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_start_misaligned_check()
809 ASSERT_EQ(rgn->size, size); in alloc_nid_bottom_up_start_misaligned_check()
814 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_start_misaligned_check()
842 phys_addr_t size = SZ_256; in alloc_nid_bottom_up_narrow_range_check() local
852 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_narrow_range_check()
857 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_narrow_range_check()
859 ASSERT_EQ(rgn->size, size); in alloc_nid_bottom_up_narrow_range_check()
863 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_narrow_range_check()
903 r1.size = SMP_CACHE_BYTES; in alloc_nid_bottom_up_reserved_with_space_check()
905 r2.size = SZ_128; in alloc_nid_bottom_up_reserved_with_space_check()
906 r2.base = r1.base - (r3_size + gap_size + r2.size); in alloc_nid_bottom_up_reserved_with_space_check()
908 total_size = r1.size + r2.size + r3_size; in alloc_nid_bottom_up_reserved_with_space_check()
909 min_addr = r2.base + r2.size; in alloc_nid_bottom_up_reserved_with_space_check()
912 memblock_reserve(r1.base, r1.size); in alloc_nid_bottom_up_reserved_with_space_check()
913 memblock_reserve(r2.base, r2.size); in alloc_nid_bottom_up_reserved_with_space_check()
922 ASSERT_EQ(rgn1->size, r1.size); in alloc_nid_bottom_up_reserved_with_space_check()
925 ASSERT_EQ(rgn2->size, r2.size + r3_size); in alloc_nid_bottom_up_reserved_with_space_check()
973 r1.size = SMP_CACHE_BYTES; in alloc_nid_bottom_up_reserved_no_space_check()
975 r2.size = SZ_128; in alloc_nid_bottom_up_reserved_no_space_check()
976 r2.base = r1.base - (r2.size + gap_size); in alloc_nid_bottom_up_reserved_no_space_check()
978 total_size = r1.size + r2.size + r3_size; in alloc_nid_bottom_up_reserved_no_space_check()
979 min_addr = r2.base + r2.size; in alloc_nid_bottom_up_reserved_no_space_check()
982 memblock_reserve(r1.base, r1.size); in alloc_nid_bottom_up_reserved_no_space_check()
983 memblock_reserve(r2.base, r2.size); in alloc_nid_bottom_up_reserved_no_space_check()
992 ASSERT_EQ(rgn3->size, r3_size); in alloc_nid_bottom_up_reserved_no_space_check()
995 ASSERT_EQ(rgn2->size, r2.size); in alloc_nid_bottom_up_reserved_no_space_check()
998 ASSERT_EQ(rgn1->size, r1.size); in alloc_nid_bottom_up_reserved_no_space_check()
1018 phys_addr_t size = SZ_256; in alloc_nid_bottom_up_cap_max_check() local
1028 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_cap_max_check()
1033 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_cap_max_check()
1035 ASSERT_EQ(rgn->size, size); in alloc_nid_bottom_up_cap_max_check()
1039 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_cap_max_check()
1055 phys_addr_t size = SZ_1K; in alloc_nid_bottom_up_cap_min_check() local
1065 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_cap_min_check()
1070 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_cap_min_check()
1072 ASSERT_EQ(rgn->size, size); in alloc_nid_bottom_up_cap_min_check()
1076 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_cap_min_check()
1249 phys_addr_t size; in alloc_nid_top_down_numa_simple_check() local
1256 ASSERT_LE(SZ_4, req_node->size); in alloc_nid_top_down_numa_simple_check()
1257 size = req_node->size / SZ_4; in alloc_nid_top_down_numa_simple_check()
1261 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_simple_check()
1265 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_simple_check()
1267 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_simple_check()
1268 ASSERT_EQ(new_rgn->base, region_end(req_node) - size); in alloc_nid_top_down_numa_simple_check()
1272 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_numa_simple_check()
1302 phys_addr_t size; in alloc_nid_top_down_numa_small_node_check() local
1309 size = SZ_2 * req_node->size; in alloc_nid_top_down_numa_small_node_check()
1313 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_small_node_check()
1317 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_small_node_check()
1319 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_small_node_check()
1320 ASSERT_EQ(new_rgn->base, region_end(exp_node) - size); in alloc_nid_top_down_numa_small_node_check()
1324 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_numa_small_node_check()
1355 phys_addr_t size; in alloc_nid_top_down_numa_node_reserved_check() local
1362 size = req_node->size; in alloc_nid_top_down_numa_node_reserved_check()
1366 memblock_reserve(req_node->base, req_node->size); in alloc_nid_top_down_numa_node_reserved_check()
1367 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_node_reserved_check()
1371 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_node_reserved_check()
1373 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_node_reserved_check()
1374 ASSERT_EQ(new_rgn->base, region_end(exp_node) - size); in alloc_nid_top_down_numa_node_reserved_check()
1378 ASSERT_EQ(memblock.reserved.total_size, size + req_node->size); in alloc_nid_top_down_numa_node_reserved_check()
1407 phys_addr_t size; in alloc_nid_top_down_numa_part_reserved_check() local
1414 ASSERT_LE(SZ_8, req_node->size); in alloc_nid_top_down_numa_part_reserved_check()
1416 r1.size = req_node->size / SZ_2; in alloc_nid_top_down_numa_part_reserved_check()
1417 size = r1.size / SZ_4; in alloc_nid_top_down_numa_part_reserved_check()
1421 memblock_reserve(r1.base, r1.size); in alloc_nid_top_down_numa_part_reserved_check()
1422 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_part_reserved_check()
1426 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_part_reserved_check()
1428 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_part_reserved_check()
1429 ASSERT_EQ(new_rgn->base, region_end(req_node) - size); in alloc_nid_top_down_numa_part_reserved_check()
1433 ASSERT_EQ(memblock.reserved.total_size, size + r1.size); in alloc_nid_top_down_numa_part_reserved_check()
1467 phys_addr_t size; in alloc_nid_top_down_numa_part_reserved_fallback_check() local
1474 ASSERT_LE(SZ_4, req_node->size); in alloc_nid_top_down_numa_part_reserved_fallback_check()
1475 size = req_node->size / SZ_2; in alloc_nid_top_down_numa_part_reserved_fallback_check()
1476 r1.base = req_node->base + (size / SZ_2); in alloc_nid_top_down_numa_part_reserved_fallback_check()
1477 r1.size = size; in alloc_nid_top_down_numa_part_reserved_fallback_check()
1482 memblock_reserve(r1.base, r1.size); in alloc_nid_top_down_numa_part_reserved_fallback_check()
1483 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_part_reserved_fallback_check()
1487 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_part_reserved_fallback_check()
1489 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_part_reserved_fallback_check()
1490 ASSERT_EQ(new_rgn->base, region_end(exp_node) - size); in alloc_nid_top_down_numa_part_reserved_fallback_check()
1494 ASSERT_EQ(memblock.reserved.total_size, size + r1.size); in alloc_nid_top_down_numa_part_reserved_fallback_check()
1527 phys_addr_t size = SZ_512; in alloc_nid_top_down_numa_split_range_low_check() local
1537 max_addr = min_addr + size; in alloc_nid_top_down_numa_split_range_low_check()
1539 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_split_range_low_check()
1543 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_split_range_low_check()
1545 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_split_range_low_check()
1546 ASSERT_EQ(new_rgn->base, req_node_end - size); in alloc_nid_top_down_numa_split_range_low_check()
1550 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_numa_split_range_low_check()
1584 phys_addr_t size = SZ_512; in alloc_nid_top_down_numa_split_range_high_check() local
1594 max_addr = min_addr + size; in alloc_nid_top_down_numa_split_range_high_check()
1596 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_split_range_high_check()
1600 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_split_range_high_check()
1602 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_split_range_high_check()
1603 ASSERT_EQ(new_rgn->base, exp_node_end - size); in alloc_nid_top_down_numa_split_range_high_check()
1607 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_numa_split_range_high_check()
1641 phys_addr_t size; in alloc_nid_top_down_numa_no_overlap_split_check() local
1648 size = SZ_512; in alloc_nid_top_down_numa_no_overlap_split_check()
1650 max_addr = min_addr + size; in alloc_nid_top_down_numa_no_overlap_split_check()
1652 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_no_overlap_split_check()
1656 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_no_overlap_split_check()
1658 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_no_overlap_split_check()
1659 ASSERT_EQ(new_rgn->base, region_end(req_node) - size); in alloc_nid_top_down_numa_no_overlap_split_check()
1663 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_numa_no_overlap_split_check()
1698 phys_addr_t size = SZ_64; in alloc_nid_top_down_numa_no_overlap_low_check() local
1708 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_no_overlap_low_check()
1712 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_no_overlap_low_check()
1714 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_no_overlap_low_check()
1715 ASSERT_EQ(new_rgn->base, max_addr - size); in alloc_nid_top_down_numa_no_overlap_low_check()
1719 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_numa_no_overlap_low_check()
1754 phys_addr_t size = SZ_64; in alloc_nid_top_down_numa_no_overlap_high_check() local
1764 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_numa_no_overlap_high_check()
1768 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_numa_no_overlap_high_check()
1770 ASSERT_EQ(new_rgn->size, size); in alloc_nid_top_down_numa_no_overlap_high_check()
1771 ASSERT_EQ(new_rgn->base, max_addr - size); in alloc_nid_top_down_numa_no_overlap_high_check()
1775 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_top_down_numa_no_overlap_high_check()
1793 phys_addr_t size; in alloc_nid_bottom_up_numa_simple_check() local
1800 ASSERT_LE(SZ_4, req_node->size); in alloc_nid_bottom_up_numa_simple_check()
1801 size = req_node->size / SZ_4; in alloc_nid_bottom_up_numa_simple_check()
1805 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_simple_check()
1809 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_simple_check()
1811 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_simple_check()
1816 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_numa_simple_check()
1846 phys_addr_t size; in alloc_nid_bottom_up_numa_small_node_check() local
1853 size = SZ_2 * req_node->size; in alloc_nid_bottom_up_numa_small_node_check()
1857 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_small_node_check()
1861 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_small_node_check()
1863 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_small_node_check()
1868 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_numa_small_node_check()
1900 phys_addr_t size; in alloc_nid_bottom_up_numa_node_reserved_check() local
1907 size = req_node->size; in alloc_nid_bottom_up_numa_node_reserved_check()
1911 memblock_reserve(req_node->base, req_node->size); in alloc_nid_bottom_up_numa_node_reserved_check()
1912 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_node_reserved_check()
1916 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_node_reserved_check()
1918 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_node_reserved_check()
1923 ASSERT_EQ(memblock.reserved.total_size, size + req_node->size); in alloc_nid_bottom_up_numa_node_reserved_check()
1952 phys_addr_t size; in alloc_nid_bottom_up_numa_part_reserved_check() local
1960 ASSERT_LE(SZ_8, req_node->size); in alloc_nid_bottom_up_numa_part_reserved_check()
1962 r1.size = req_node->size / SZ_2; in alloc_nid_bottom_up_numa_part_reserved_check()
1963 size = r1.size / SZ_4; in alloc_nid_bottom_up_numa_part_reserved_check()
1966 total_size = size + r1.size; in alloc_nid_bottom_up_numa_part_reserved_check()
1968 memblock_reserve(r1.base, r1.size); in alloc_nid_bottom_up_numa_part_reserved_check()
1969 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_part_reserved_check()
1973 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_part_reserved_check()
1975 ASSERT_EQ(new_rgn->size, total_size); in alloc_nid_bottom_up_numa_part_reserved_check()
2014 phys_addr_t size; in alloc_nid_bottom_up_numa_part_reserved_fallback_check() local
2021 ASSERT_LE(SZ_4, req_node->size); in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2022 size = req_node->size / SZ_2; in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2023 r1.base = req_node->base + (size / SZ_2); in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2024 r1.size = size; in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2029 memblock_reserve(r1.base, r1.size); in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2030 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2034 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2036 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2041 ASSERT_EQ(memblock.reserved.total_size, size + r1.size); in alloc_nid_bottom_up_numa_part_reserved_fallback_check()
2074 phys_addr_t size = SZ_512; in alloc_nid_bottom_up_numa_split_range_low_check() local
2084 max_addr = min_addr + size; in alloc_nid_bottom_up_numa_split_range_low_check()
2086 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_split_range_low_check()
2090 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_split_range_low_check()
2092 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_split_range_low_check()
2097 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_numa_split_range_low_check()
2132 phys_addr_t size = SZ_512; in alloc_nid_bottom_up_numa_split_range_high_check() local
2142 max_addr = min_addr + size; in alloc_nid_bottom_up_numa_split_range_high_check()
2144 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_split_range_high_check()
2148 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_split_range_high_check()
2150 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_split_range_high_check()
2155 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_numa_split_range_high_check()
2189 phys_addr_t size; in alloc_nid_bottom_up_numa_no_overlap_split_check() local
2196 size = SZ_512; in alloc_nid_bottom_up_numa_no_overlap_split_check()
2198 max_addr = min_addr + size; in alloc_nid_bottom_up_numa_no_overlap_split_check()
2200 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_no_overlap_split_check()
2204 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_no_overlap_split_check()
2206 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_no_overlap_split_check()
2211 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_numa_no_overlap_split_check()
2246 phys_addr_t size = SZ_64; in alloc_nid_bottom_up_numa_no_overlap_low_check() local
2256 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_no_overlap_low_check()
2260 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_no_overlap_low_check()
2262 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_no_overlap_low_check()
2267 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_numa_no_overlap_low_check()
2302 phys_addr_t size = SZ_64; in alloc_nid_bottom_up_numa_no_overlap_high_check() local
2312 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_bottom_up_numa_no_overlap_high_check()
2316 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_bottom_up_numa_no_overlap_high_check()
2318 ASSERT_EQ(new_rgn->size, size); in alloc_nid_bottom_up_numa_no_overlap_high_check()
2323 ASSERT_EQ(memblock.reserved.total_size, size); in alloc_nid_bottom_up_numa_no_overlap_high_check()
2348 phys_addr_t size = MEM_SIZE / SZ_2; in alloc_nid_numa_large_region_generic_check() local
2358 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_numa_large_region_generic_check()
2397 phys_addr_t size = req_node->size; in alloc_nid_numa_reserved_full_merge_generic_check() local
2406 r1.size = SZ_128; in alloc_nid_numa_reserved_full_merge_generic_check()
2408 r2.size = SZ_128; in alloc_nid_numa_reserved_full_merge_generic_check()
2409 r2.base = r1.base - (size + r2.size); in alloc_nid_numa_reserved_full_merge_generic_check()
2411 total_size = r1.size + r2.size + size; in alloc_nid_numa_reserved_full_merge_generic_check()
2412 min_addr = r2.base + r2.size; in alloc_nid_numa_reserved_full_merge_generic_check()
2415 memblock_reserve(r1.base, r1.size); in alloc_nid_numa_reserved_full_merge_generic_check()
2416 memblock_reserve(r2.base, r2.size); in alloc_nid_numa_reserved_full_merge_generic_check()
2418 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_numa_reserved_full_merge_generic_check()
2422 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_numa_reserved_full_merge_generic_check()
2424 ASSERT_EQ(new_rgn->size, total_size); in alloc_nid_numa_reserved_full_merge_generic_check()
2467 phys_addr_t size = SZ_256; in alloc_nid_numa_split_all_reserved_generic_check() local
2475 r2.size = memblock_end_of_DRAM() - r2.base; in alloc_nid_numa_split_all_reserved_generic_check()
2477 r1.size = MEM_SIZE - (r2.size + size); in alloc_nid_numa_split_all_reserved_generic_check()
2480 min_addr = r1.base + r1.size; in alloc_nid_numa_split_all_reserved_generic_check()
2483 memblock_reserve(r1.base, r1.size); in alloc_nid_numa_split_all_reserved_generic_check()
2484 memblock_reserve(r2.base, r2.size); in alloc_nid_numa_split_all_reserved_generic_check()
2486 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_numa_split_all_reserved_generic_check()
2509 phys_addr_t size = SZ_512; in alloc_node_on_correct_nid() local
2514 allocated_ptr = memblock_alloc_node(size, SMP_CACHE_BYTES, nid_req); in alloc_node_on_correct_nid()