Lines Matching refs:size
49 .size = SZ_4M in memblock_add_simple_check()
55 memblock_add(r.base, r.size); in memblock_add_simple_check()
58 ASSERT_EQ(rgn->size, r.size); in memblock_add_simple_check()
61 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_simple_check()
82 .size = SZ_16M in memblock_add_node_simple_check()
88 memblock_add_node(r.base, r.size, 1, MEMBLOCK_HOTPLUG); in memblock_add_node_simple_check()
91 ASSERT_EQ(rgn->size, r.size); in memblock_add_node_simple_check()
98 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_node_simple_check()
126 .size = SZ_8K in memblock_add_disjoint_check()
130 .size = SZ_8K in memblock_add_disjoint_check()
136 memblock_add(r1.base, r1.size); in memblock_add_disjoint_check()
137 memblock_add(r2.base, r2.size); in memblock_add_disjoint_check()
140 ASSERT_EQ(rgn1->size, r1.size); in memblock_add_disjoint_check()
143 ASSERT_EQ(rgn2->size, r2.size); in memblock_add_disjoint_check()
146 ASSERT_EQ(memblock.memory.total_size, r1.size + r2.size); in memblock_add_disjoint_check()
179 .size = SZ_1G in memblock_add_overlap_top_check()
183 .size = SZ_512M in memblock_add_overlap_top_check()
188 total_size = (r1.base - r2.base) + r1.size; in memblock_add_overlap_top_check()
191 memblock_add(r1.base, r1.size); in memblock_add_overlap_top_check()
192 memblock_add(r2.base, r2.size); in memblock_add_overlap_top_check()
195 ASSERT_EQ(rgn->size, total_size); in memblock_add_overlap_top_check()
231 .size = SZ_512M in memblock_add_overlap_bottom_check()
235 .size = SZ_1G in memblock_add_overlap_bottom_check()
240 total_size = (r2.base - r1.base) + r2.size; in memblock_add_overlap_bottom_check()
243 memblock_add(r1.base, r1.size); in memblock_add_overlap_bottom_check()
244 memblock_add(r2.base, r2.size); in memblock_add_overlap_bottom_check()
247 ASSERT_EQ(rgn->size, total_size); in memblock_add_overlap_bottom_check()
280 .size = SZ_32M in memblock_add_within_check()
284 .size = SZ_1M in memblock_add_within_check()
290 memblock_add(r1.base, r1.size); in memblock_add_within_check()
291 memblock_add(r2.base, r2.size); in memblock_add_within_check()
294 ASSERT_EQ(rgn->size, r1.size); in memblock_add_within_check()
297 ASSERT_EQ(memblock.memory.total_size, r1.size); in memblock_add_within_check()
312 .size = SZ_2M in memblock_add_twice_check()
319 memblock_add(r.base, r.size); in memblock_add_twice_check()
320 memblock_add(r.base, r.size); in memblock_add_twice_check()
323 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_twice_check()
351 .size = SZ_8K in memblock_add_between_check()
355 .size = SZ_8K in memblock_add_between_check()
359 .size = SZ_8K in memblock_add_between_check()
364 total_size = r1.size + r2.size + r3.size; in memblock_add_between_check()
367 memblock_add(r1.base, r1.size); in memblock_add_between_check()
368 memblock_add(r2.base, r2.size); in memblock_add_between_check()
369 memblock_add(r3.base, r3.size); in memblock_add_between_check()
372 ASSERT_EQ(rgn->size, total_size); in memblock_add_between_check()
405 .size = SZ_2M in memblock_add_near_max_check()
413 memblock_add(r.base, r.size); in memblock_add_near_max_check()
416 ASSERT_EQ(rgn->size, total_size); in memblock_add_near_max_check()
438 .size = SZ_16K, in memblock_add_many_check()
441 phys_addr_t base, size = SZ_64; in memblock_add_many_check() local
470 memblock_add(base, size); in memblock_add_many_check()
471 base += size + gap_size; in memblock_add_many_check()
475 (i + 1) * size); in memblock_add_many_check()
492 memblock_add(r.base, r.size); in memblock_add_many_check()
494 ASSERT_EQ(memblock.memory.regions[0].size, r.size); in memblock_add_many_check()
497 ASSERT_EQ(memblock.memory.total_size, INIT_MEMBLOCK_REGIONS * size + in memblock_add_many_check()
499 r.size); in memblock_add_many_check()
554 .size = SZ_128M in memblock_reserve_simple_check()
560 memblock_reserve(r.base, r.size); in memblock_reserve_simple_check()
563 ASSERT_EQ(rgn->size, r.size); in memblock_reserve_simple_check()
590 .size = SZ_16M in memblock_reserve_disjoint_check()
594 .size = SZ_512M in memblock_reserve_disjoint_check()
600 memblock_reserve(r1.base, r1.size); in memblock_reserve_disjoint_check()
601 memblock_reserve(r2.base, r2.size); in memblock_reserve_disjoint_check()
604 ASSERT_EQ(rgn1->size, r1.size); in memblock_reserve_disjoint_check()
607 ASSERT_EQ(rgn2->size, r2.size); in memblock_reserve_disjoint_check()
610 ASSERT_EQ(memblock.reserved.total_size, r1.size + r2.size); in memblock_reserve_disjoint_check()
644 .size = SZ_1G in memblock_reserve_overlap_top_check()
648 .size = SZ_1G in memblock_reserve_overlap_top_check()
653 total_size = (r1.base - r2.base) + r1.size; in memblock_reserve_overlap_top_check()
656 memblock_reserve(r1.base, r1.size); in memblock_reserve_overlap_top_check()
657 memblock_reserve(r2.base, r2.size); in memblock_reserve_overlap_top_check()
660 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_overlap_top_check()
697 .size = SZ_128K in memblock_reserve_overlap_bottom_check()
701 .size = SZ_128K in memblock_reserve_overlap_bottom_check()
706 total_size = (r2.base - r1.base) + r2.size; in memblock_reserve_overlap_bottom_check()
709 memblock_reserve(r1.base, r1.size); in memblock_reserve_overlap_bottom_check()
710 memblock_reserve(r2.base, r2.size); in memblock_reserve_overlap_bottom_check()
713 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_overlap_bottom_check()
748 .size = SZ_8M in memblock_reserve_within_check()
752 .size = SZ_64K in memblock_reserve_within_check()
758 memblock_reserve(r1.base, r1.size); in memblock_reserve_within_check()
759 memblock_reserve(r2.base, r2.size); in memblock_reserve_within_check()
762 ASSERT_EQ(rgn->size, r1.size); in memblock_reserve_within_check()
765 ASSERT_EQ(memblock.reserved.total_size, r1.size); in memblock_reserve_within_check()
781 .size = SZ_2M in memblock_reserve_twice_check()
788 memblock_reserve(r.base, r.size); in memblock_reserve_twice_check()
789 memblock_reserve(r.base, r.size); in memblock_reserve_twice_check()
792 ASSERT_EQ(memblock.reserved.total_size, r.size); in memblock_reserve_twice_check()
820 .size = SZ_8K in memblock_reserve_between_check()
824 .size = SZ_8K in memblock_reserve_between_check()
828 .size = SZ_8K in memblock_reserve_between_check()
833 total_size = r1.size + r2.size + r3.size; in memblock_reserve_between_check()
836 memblock_reserve(r1.base, r1.size); in memblock_reserve_between_check()
837 memblock_reserve(r2.base, r2.size); in memblock_reserve_between_check()
838 memblock_reserve(r3.base, r3.size); in memblock_reserve_between_check()
841 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_between_check()
874 .size = SZ_2M in memblock_reserve_near_max_check()
882 memblock_reserve(r.base, r.size); in memblock_reserve_near_max_check()
885 ASSERT_EQ(rgn->size, total_size); in memblock_reserve_near_max_check()
907 .size = SZ_16K, in memblock_reserve_many_check()
959 memblock_reserve(r.base, r.size); in memblock_reserve_many_check()
961 ASSERT_EQ(memblock.reserved.regions[0].size, r.size); in memblock_reserve_many_check()
966 r.size); in memblock_reserve_many_check()
1030 .size = SZ_4K in memblock_remove_simple_check()
1034 .size = SZ_4M in memblock_remove_simple_check()
1040 memblock_add(r1.base, r1.size); in memblock_remove_simple_check()
1041 memblock_add(r2.base, r2.size); in memblock_remove_simple_check()
1042 memblock_remove(r1.base, r1.size); in memblock_remove_simple_check()
1045 ASSERT_EQ(rgn->size, r2.size); in memblock_remove_simple_check()
1048 ASSERT_EQ(memblock.memory.total_size, r2.size); in memblock_remove_simple_check()
1079 .size = SZ_4M in memblock_remove_absent_check()
1083 .size = SZ_1G in memblock_remove_absent_check()
1089 memblock_add(r1.base, r1.size); in memblock_remove_absent_check()
1090 memblock_remove(r2.base, r2.size); in memblock_remove_absent_check()
1093 ASSERT_EQ(rgn->size, r1.size); in memblock_remove_absent_check()
1096 ASSERT_EQ(memblock.memory.total_size, r1.size); in memblock_remove_absent_check()
1131 .size = SZ_32M in memblock_remove_overlap_top_check()
1135 .size = SZ_32M in memblock_remove_overlap_top_check()
1140 r1_end = r1.base + r1.size; in memblock_remove_overlap_top_check()
1141 r2_end = r2.base + r2.size; in memblock_remove_overlap_top_check()
1145 memblock_add(r1.base, r1.size); in memblock_remove_overlap_top_check()
1146 memblock_remove(r2.base, r2.size); in memblock_remove_overlap_top_check()
1149 ASSERT_EQ(rgn->size, total_size); in memblock_remove_overlap_top_check()
1185 .size = SZ_64M in memblock_remove_overlap_bottom_check()
1189 .size = SZ_256M in memblock_remove_overlap_bottom_check()
1197 memblock_add(r1.base, r1.size); in memblock_remove_overlap_bottom_check()
1198 memblock_remove(r2.base, r2.size); in memblock_remove_overlap_bottom_check()
1201 ASSERT_EQ(rgn->size, total_size); in memblock_remove_overlap_bottom_check()
1240 .size = SZ_32M in memblock_remove_within_check()
1244 .size = SZ_1M in memblock_remove_within_check()
1250 r2_size = (r1.base + r1.size) - (r2.base + r2.size); in memblock_remove_within_check()
1254 memblock_add(r1.base, r1.size); in memblock_remove_within_check()
1255 memblock_remove(r2.base, r2.size); in memblock_remove_within_check()
1258 ASSERT_EQ(rgn1->size, r1_size); in memblock_remove_within_check()
1260 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_remove_within_check()
1261 ASSERT_EQ(rgn2->size, r2_size); in memblock_remove_within_check()
1286 .size = SZ_4K in memblock_remove_only_region_check()
1292 memblock_add(r1.base, r1.size); in memblock_remove_only_region_check()
1293 memblock_remove(r1.base, r1.size); in memblock_remove_only_region_check()
1296 ASSERT_EQ(rgn->size, 0); in memblock_remove_only_region_check()
1330 .size = SZ_2M in memblock_remove_near_max_check()
1335 .size = SZ_2M in memblock_remove_near_max_check()
1340 total_size = r1.size - (PHYS_ADDR_MAX - r2.base); in memblock_remove_near_max_check()
1343 memblock_add(r1.base, r1.size); in memblock_remove_near_max_check()
1344 memblock_remove(r2.base, r2.size); in memblock_remove_near_max_check()
1347 ASSERT_EQ(rgn->size, total_size); in memblock_remove_near_max_check()
1382 .size = SZ_32M in memblock_remove_overlap_two_check()
1386 .size = SZ_64M in memblock_remove_overlap_two_check()
1390 .size = SZ_64M in memblock_remove_overlap_two_check()
1395 r2_end = r2.base + r2.size; in memblock_remove_overlap_two_check()
1396 r3_end = r3.base + r3.size; in memblock_remove_overlap_two_check()
1402 memblock_add(r1.base, r1.size); in memblock_remove_overlap_two_check()
1403 memblock_add(r2.base, r2.size); in memblock_remove_overlap_two_check()
1404 memblock_remove(r3.base, r3.size); in memblock_remove_overlap_two_check()
1407 ASSERT_EQ(rgn1->size, new_r1_size); in memblock_remove_overlap_two_check()
1410 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_remove_overlap_two_check()
1463 .size = SZ_1M in memblock_free_simple_check()
1467 .size = SZ_1M in memblock_free_simple_check()
1473 memblock_reserve(r1.base, r1.size); in memblock_free_simple_check()
1474 memblock_reserve(r2.base, r2.size); in memblock_free_simple_check()
1475 memblock_free((void *)r1.base, r1.size); in memblock_free_simple_check()
1478 ASSERT_EQ(rgn->size, r2.size); in memblock_free_simple_check()
1481 ASSERT_EQ(memblock.reserved.total_size, r2.size); in memblock_free_simple_check()
1512 .size = SZ_8K in memblock_free_absent_check()
1516 .size = SZ_128M in memblock_free_absent_check()
1522 memblock_reserve(r1.base, r1.size); in memblock_free_absent_check()
1523 memblock_free((void *)r2.base, r2.size); in memblock_free_absent_check()
1526 ASSERT_EQ(rgn->size, r1.size); in memblock_free_absent_check()
1529 ASSERT_EQ(memblock.reserved.total_size, r1.size); in memblock_free_absent_check()
1564 .size = SZ_32M in memblock_free_overlap_top_check()
1568 .size = SZ_8M in memblock_free_overlap_top_check()
1573 total_size = (r1.size + r1.base) - (r2.base + r2.size); in memblock_free_overlap_top_check()
1576 memblock_reserve(r1.base, r1.size); in memblock_free_overlap_top_check()
1577 memblock_free((void *)r2.base, r2.size); in memblock_free_overlap_top_check()
1579 ASSERT_EQ(rgn->base, r2.base + r2.size); in memblock_free_overlap_top_check()
1580 ASSERT_EQ(rgn->size, total_size); in memblock_free_overlap_top_check()
1613 .size = SZ_32M in memblock_free_overlap_bottom_check()
1617 .size = SZ_32M in memblock_free_overlap_bottom_check()
1625 memblock_reserve(r1.base, r1.size); in memblock_free_overlap_bottom_check()
1626 memblock_free((void *)r2.base, r2.size); in memblock_free_overlap_bottom_check()
1629 ASSERT_EQ(rgn->size, total_size); in memblock_free_overlap_bottom_check()
1668 .size = SZ_8M in memblock_free_within_check()
1672 .size = SZ_1M in memblock_free_within_check()
1678 r2_size = (r1.base + r1.size) - (r2.base + r2.size); in memblock_free_within_check()
1682 memblock_reserve(r1.base, r1.size); in memblock_free_within_check()
1683 memblock_free((void *)r2.base, r2.size); in memblock_free_within_check()
1686 ASSERT_EQ(rgn1->size, r1_size); in memblock_free_within_check()
1688 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_free_within_check()
1689 ASSERT_EQ(rgn2->size, r2_size); in memblock_free_within_check()
1714 .size = SZ_4K in memblock_free_only_region_check()
1720 memblock_reserve(r1.base, r1.size); in memblock_free_only_region_check()
1721 memblock_free((void *)r1.base, r1.size); in memblock_free_only_region_check()
1724 ASSERT_EQ(rgn->size, 0); in memblock_free_only_region_check()
1757 .size = SZ_2M in memblock_free_near_max_check()
1762 .size = SZ_2M in memblock_free_near_max_check()
1767 total_size = r1.size - (PHYS_ADDR_MAX - r2.base); in memblock_free_near_max_check()
1770 memblock_reserve(r1.base, r1.size); in memblock_free_near_max_check()
1771 memblock_free((void *)r2.base, r2.size); in memblock_free_near_max_check()
1774 ASSERT_EQ(rgn->size, total_size); in memblock_free_near_max_check()
1809 .size = SZ_32M in memblock_free_overlap_two_check()
1813 .size = SZ_64M in memblock_free_overlap_two_check()
1817 .size = SZ_64M in memblock_free_overlap_two_check()
1822 r2_end = r2.base + r2.size; in memblock_free_overlap_two_check()
1823 r3_end = r3.base + r3.size; in memblock_free_overlap_two_check()
1829 memblock_reserve(r1.base, r1.size); in memblock_free_overlap_two_check()
1830 memblock_reserve(r2.base, r2.size); in memblock_free_overlap_two_check()
1831 memblock_free((void *)r3.base, r3.size); in memblock_free_overlap_two_check()
1834 ASSERT_EQ(rgn1->size, new_r1_size); in memblock_free_overlap_two_check()
1837 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_free_overlap_two_check()
1925 .size = alignment * 4 in memblock_trim_memory_aligned_check()
1931 memblock_add(r.base, r.size); in memblock_trim_memory_aligned_check()
1935 ASSERT_EQ(rgn->size, r.size); in memblock_trim_memory_aligned_check()
1971 .size = alignment * 2 in memblock_trim_memory_too_small_check()
1975 .size = alignment - SZ_2 in memblock_trim_memory_too_small_check()
1981 memblock_add(r1.base, r1.size); in memblock_trim_memory_too_small_check()
1982 memblock_add(r2.base, r2.size); in memblock_trim_memory_too_small_check()
1986 ASSERT_EQ(rgn->size, r1.size); in memblock_trim_memory_too_small_check()
2026 .size = alignment * 2 in memblock_trim_memory_unaligned_base_check()
2030 .size = alignment * 2 - offset in memblock_trim_memory_unaligned_base_check()
2036 new_r2_size = r2.size - (alignment - offset); in memblock_trim_memory_unaligned_base_check()
2039 memblock_add(r1.base, r1.size); in memblock_trim_memory_unaligned_base_check()
2040 memblock_add(r2.base, r2.size); in memblock_trim_memory_unaligned_base_check()
2044 ASSERT_EQ(rgn1->size, r1.size); in memblock_trim_memory_unaligned_base_check()
2047 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_trim_memory_unaligned_base_check()
2087 .size = alignment * 2 in memblock_trim_memory_unaligned_end_check()
2091 .size = alignment * 2 - offset in memblock_trim_memory_unaligned_end_check()
2096 new_r2_size = r2.size - (alignment - offset); in memblock_trim_memory_unaligned_end_check()
2099 memblock_add(r1.base, r1.size); in memblock_trim_memory_unaligned_end_check()
2100 memblock_add(r2.base, r2.size); in memblock_trim_memory_unaligned_end_check()
2104 ASSERT_EQ(rgn1->size, r1.size); in memblock_trim_memory_unaligned_end_check()
2107 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_trim_memory_unaligned_end_check()