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()
1006 .size = SZ_16K, in memblock_reserve_all_locations_check()
1064 memblock_reserve(r.base, r.size); in memblock_reserve_all_locations_check()
1066 ASSERT_EQ(memblock.reserved.regions[0].size, r.size); in memblock_reserve_all_locations_check()
1071 r.size); in memblock_reserve_all_locations_check()
1129 .size = SZ_16K, in memblock_reserve_many_may_conflict_check()
1206 ASSERT_EQ(memblock.reserved.regions[0].base + memblock.reserved.regions[0].size, in memblock_reserve_many_may_conflict_check()
1208 ASSERT_EQ(memblock.reserved.regions[0].size, new_reserved_regions_size); in memblock_reserve_many_may_conflict_check()
1214 memblock_reserve(r.base, r.size); in memblock_reserve_many_may_conflict_check()
1216 ASSERT_EQ(memblock.reserved.regions[0].size, r.size); in memblock_reserve_many_may_conflict_check()
1221 r.size); in memblock_reserve_many_may_conflict_check()
1288 .size = SZ_4K in memblock_remove_simple_check()
1292 .size = SZ_4M in memblock_remove_simple_check()
1298 memblock_add(r1.base, r1.size); in memblock_remove_simple_check()
1299 memblock_add(r2.base, r2.size); in memblock_remove_simple_check()
1300 memblock_remove(r1.base, r1.size); in memblock_remove_simple_check()
1303 ASSERT_EQ(rgn->size, r2.size); in memblock_remove_simple_check()
1306 ASSERT_EQ(memblock.memory.total_size, r2.size); in memblock_remove_simple_check()
1337 .size = SZ_4M in memblock_remove_absent_check()
1341 .size = SZ_1G in memblock_remove_absent_check()
1347 memblock_add(r1.base, r1.size); in memblock_remove_absent_check()
1348 memblock_remove(r2.base, r2.size); in memblock_remove_absent_check()
1351 ASSERT_EQ(rgn->size, r1.size); in memblock_remove_absent_check()
1354 ASSERT_EQ(memblock.memory.total_size, r1.size); in memblock_remove_absent_check()
1389 .size = SZ_32M in memblock_remove_overlap_top_check()
1393 .size = SZ_32M in memblock_remove_overlap_top_check()
1398 r1_end = r1.base + r1.size; in memblock_remove_overlap_top_check()
1399 r2_end = r2.base + r2.size; in memblock_remove_overlap_top_check()
1403 memblock_add(r1.base, r1.size); in memblock_remove_overlap_top_check()
1404 memblock_remove(r2.base, r2.size); in memblock_remove_overlap_top_check()
1407 ASSERT_EQ(rgn->size, total_size); in memblock_remove_overlap_top_check()
1443 .size = SZ_64M in memblock_remove_overlap_bottom_check()
1447 .size = SZ_256M in memblock_remove_overlap_bottom_check()
1455 memblock_add(r1.base, r1.size); in memblock_remove_overlap_bottom_check()
1456 memblock_remove(r2.base, r2.size); in memblock_remove_overlap_bottom_check()
1459 ASSERT_EQ(rgn->size, total_size); in memblock_remove_overlap_bottom_check()
1498 .size = SZ_32M in memblock_remove_within_check()
1502 .size = SZ_1M in memblock_remove_within_check()
1508 r2_size = (r1.base + r1.size) - (r2.base + r2.size); in memblock_remove_within_check()
1512 memblock_add(r1.base, r1.size); in memblock_remove_within_check()
1513 memblock_remove(r2.base, r2.size); in memblock_remove_within_check()
1516 ASSERT_EQ(rgn1->size, r1_size); in memblock_remove_within_check()
1518 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_remove_within_check()
1519 ASSERT_EQ(rgn2->size, r2_size); in memblock_remove_within_check()
1544 .size = SZ_4K in memblock_remove_only_region_check()
1550 memblock_add(r1.base, r1.size); in memblock_remove_only_region_check()
1551 memblock_remove(r1.base, r1.size); in memblock_remove_only_region_check()
1554 ASSERT_EQ(rgn->size, 0); in memblock_remove_only_region_check()
1588 .size = SZ_2M in memblock_remove_near_max_check()
1593 .size = SZ_2M in memblock_remove_near_max_check()
1598 total_size = r1.size - (PHYS_ADDR_MAX - r2.base); in memblock_remove_near_max_check()
1601 memblock_add(r1.base, r1.size); in memblock_remove_near_max_check()
1602 memblock_remove(r2.base, r2.size); in memblock_remove_near_max_check()
1605 ASSERT_EQ(rgn->size, total_size); in memblock_remove_near_max_check()
1640 .size = SZ_32M in memblock_remove_overlap_two_check()
1644 .size = SZ_64M in memblock_remove_overlap_two_check()
1648 .size = SZ_64M in memblock_remove_overlap_two_check()
1653 r2_end = r2.base + r2.size; in memblock_remove_overlap_two_check()
1654 r3_end = r3.base + r3.size; in memblock_remove_overlap_two_check()
1660 memblock_add(r1.base, r1.size); in memblock_remove_overlap_two_check()
1661 memblock_add(r2.base, r2.size); in memblock_remove_overlap_two_check()
1662 memblock_remove(r3.base, r3.size); in memblock_remove_overlap_two_check()
1665 ASSERT_EQ(rgn1->size, new_r1_size); in memblock_remove_overlap_two_check()
1668 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_remove_overlap_two_check()
1721 .size = SZ_1M in memblock_free_simple_check()
1725 .size = SZ_1M in memblock_free_simple_check()
1731 memblock_reserve(r1.base, r1.size); in memblock_free_simple_check()
1732 memblock_reserve(r2.base, r2.size); in memblock_free_simple_check()
1733 memblock_free((void *)r1.base, r1.size); in memblock_free_simple_check()
1736 ASSERT_EQ(rgn->size, r2.size); in memblock_free_simple_check()
1739 ASSERT_EQ(memblock.reserved.total_size, r2.size); in memblock_free_simple_check()
1770 .size = SZ_8K in memblock_free_absent_check()
1774 .size = SZ_128M in memblock_free_absent_check()
1780 memblock_reserve(r1.base, r1.size); in memblock_free_absent_check()
1781 memblock_free((void *)r2.base, r2.size); in memblock_free_absent_check()
1784 ASSERT_EQ(rgn->size, r1.size); in memblock_free_absent_check()
1787 ASSERT_EQ(memblock.reserved.total_size, r1.size); in memblock_free_absent_check()
1822 .size = SZ_32M in memblock_free_overlap_top_check()
1826 .size = SZ_8M in memblock_free_overlap_top_check()
1831 total_size = (r1.size + r1.base) - (r2.base + r2.size); in memblock_free_overlap_top_check()
1834 memblock_reserve(r1.base, r1.size); in memblock_free_overlap_top_check()
1835 memblock_free((void *)r2.base, r2.size); in memblock_free_overlap_top_check()
1837 ASSERT_EQ(rgn->base, r2.base + r2.size); in memblock_free_overlap_top_check()
1838 ASSERT_EQ(rgn->size, total_size); in memblock_free_overlap_top_check()
1871 .size = SZ_32M in memblock_free_overlap_bottom_check()
1875 .size = SZ_32M in memblock_free_overlap_bottom_check()
1883 memblock_reserve(r1.base, r1.size); in memblock_free_overlap_bottom_check()
1884 memblock_free((void *)r2.base, r2.size); in memblock_free_overlap_bottom_check()
1887 ASSERT_EQ(rgn->size, total_size); in memblock_free_overlap_bottom_check()
1926 .size = SZ_8M in memblock_free_within_check()
1930 .size = SZ_1M in memblock_free_within_check()
1936 r2_size = (r1.base + r1.size) - (r2.base + r2.size); in memblock_free_within_check()
1940 memblock_reserve(r1.base, r1.size); in memblock_free_within_check()
1941 memblock_free((void *)r2.base, r2.size); in memblock_free_within_check()
1944 ASSERT_EQ(rgn1->size, r1_size); in memblock_free_within_check()
1946 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_free_within_check()
1947 ASSERT_EQ(rgn2->size, r2_size); in memblock_free_within_check()
1972 .size = SZ_4K in memblock_free_only_region_check()
1978 memblock_reserve(r1.base, r1.size); in memblock_free_only_region_check()
1979 memblock_free((void *)r1.base, r1.size); in memblock_free_only_region_check()
1982 ASSERT_EQ(rgn->size, 0); in memblock_free_only_region_check()
2015 .size = SZ_2M in memblock_free_near_max_check()
2020 .size = SZ_2M in memblock_free_near_max_check()
2025 total_size = r1.size - (PHYS_ADDR_MAX - r2.base); in memblock_free_near_max_check()
2028 memblock_reserve(r1.base, r1.size); in memblock_free_near_max_check()
2029 memblock_free((void *)r2.base, r2.size); in memblock_free_near_max_check()
2032 ASSERT_EQ(rgn->size, total_size); in memblock_free_near_max_check()
2067 .size = SZ_32M in memblock_free_overlap_two_check()
2071 .size = SZ_64M in memblock_free_overlap_two_check()
2075 .size = SZ_64M in memblock_free_overlap_two_check()
2080 r2_end = r2.base + r2.size; in memblock_free_overlap_two_check()
2081 r3_end = r3.base + r3.size; in memblock_free_overlap_two_check()
2087 memblock_reserve(r1.base, r1.size); in memblock_free_overlap_two_check()
2088 memblock_reserve(r2.base, r2.size); in memblock_free_overlap_two_check()
2089 memblock_free((void *)r3.base, r3.size); in memblock_free_overlap_two_check()
2092 ASSERT_EQ(rgn1->size, new_r1_size); in memblock_free_overlap_two_check()
2095 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_free_overlap_two_check()
2183 .size = alignment * 4 in memblock_trim_memory_aligned_check()
2189 memblock_add(r.base, r.size); in memblock_trim_memory_aligned_check()
2193 ASSERT_EQ(rgn->size, r.size); in memblock_trim_memory_aligned_check()
2229 .size = alignment * 2 in memblock_trim_memory_too_small_check()
2233 .size = alignment - SZ_2 in memblock_trim_memory_too_small_check()
2239 memblock_add(r1.base, r1.size); in memblock_trim_memory_too_small_check()
2240 memblock_add(r2.base, r2.size); in memblock_trim_memory_too_small_check()
2244 ASSERT_EQ(rgn->size, r1.size); in memblock_trim_memory_too_small_check()
2284 .size = alignment * 2 in memblock_trim_memory_unaligned_base_check()
2288 .size = alignment * 2 - offset in memblock_trim_memory_unaligned_base_check()
2294 new_r2_size = r2.size - (alignment - offset); in memblock_trim_memory_unaligned_base_check()
2297 memblock_add(r1.base, r1.size); in memblock_trim_memory_unaligned_base_check()
2298 memblock_add(r2.base, r2.size); in memblock_trim_memory_unaligned_base_check()
2302 ASSERT_EQ(rgn1->size, r1.size); in memblock_trim_memory_unaligned_base_check()
2305 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_trim_memory_unaligned_base_check()
2345 .size = alignment * 2 in memblock_trim_memory_unaligned_end_check()
2349 .size = alignment * 2 - offset in memblock_trim_memory_unaligned_end_check()
2354 new_r2_size = r2.size - (alignment - offset); in memblock_trim_memory_unaligned_end_check()
2357 memblock_add(r1.base, r1.size); in memblock_trim_memory_unaligned_end_check()
2358 memblock_add(r2.base, r2.size); in memblock_trim_memory_unaligned_end_check()
2362 ASSERT_EQ(rgn1->size, r1.size); in memblock_trim_memory_unaligned_end_check()
2365 ASSERT_EQ(rgn2->size, new_r2_size); in memblock_trim_memory_unaligned_end_check()
2394 .size = SZ_4M in memblock_overlaps_region_check()
2400 memblock_add(r.base, r.size); in memblock_overlaps_region_check()