Lines Matching full:r2
110 * | | r1 | | r2 | |
128 struct region r2 = { in memblock_add_disjoint_check() local
137 memblock_add(r2.base, r2.size); in memblock_add_disjoint_check()
142 ASSERT_EQ(rgn2->base, r2.base); 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()
154 * A test that tries to add two memory blocks r1 and r2, where r2 overlaps
155 * with the beginning of r1 (that is r1.base < r2.base + r2.size):
158 * | | |r2 | r1 | |
164 * r2.base
166 * Expect to merge the two entries into one region that starts at r2.base
181 struct region r2 = { in memblock_add_overlap_top_check() local
188 total_size = (r1.base - r2.base) + r1.size; in memblock_add_overlap_top_check()
192 memblock_add(r2.base, r2.size); in memblock_add_overlap_top_check()
194 ASSERT_EQ(rgn->base, r2.base); in memblock_add_overlap_top_check()
206 * A test that tries to add two memory blocks r1 and r2, where r2 overlaps
207 * with the end of r1 (that is r2.base < r1.base + r1.size):
210 * | | | r1 | r2 | |
214 * | r2.base
233 struct region r2 = { in memblock_add_overlap_bottom_check() local
240 total_size = (r2.base - r1.base) + r2.size; in memblock_add_overlap_bottom_check()
244 memblock_add(r2.base, r2.size); in memblock_add_overlap_bottom_check()
258 * A test that tries to add two memory blocks r1 and r2, where r2 is
259 * within the range of r1 (that is r1.base < r2.base &&
260 * r2.base + r2.size < r1.base + r1.size):
263 * | | |r2| r1 |
282 struct region r2 = { in memblock_add_within_check() local
291 memblock_add(r2.base, r2.size); in memblock_add_within_check()
335 * | | r1 | r3 | r2 | |
339 * and has size of r1.size + r2.size + r3.size. The region counter and total
353 struct region r2 = { in memblock_add_between_check() local
364 total_size = r1.size + r2.size + r3.size; in memblock_add_between_check()
368 memblock_add(r2.base, r2.size); in memblock_add_between_check()
574 * | |r1| | r2 | |
592 struct region r2 = { in memblock_reserve_disjoint_check() local
601 memblock_reserve(r2.base, r2.size); in memblock_reserve_disjoint_check()
606 ASSERT_EQ(rgn2->base, r2.base); 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()
618 * A test that tries to mark two memory blocks r1 and r2 as reserved,
619 * where r2 overlaps with the beginning of r1 (that is
620 * r1.base < r2.base + r2.size):
623 * | | r2 | | r1 | |
629 * r2.base
631 * Expect to merge two entries into one region that starts at r2.base and
646 struct region r2 = { in memblock_reserve_overlap_top_check() local
653 total_size = (r1.base - r2.base) + r1.size; in memblock_reserve_overlap_top_check()
657 memblock_reserve(r2.base, r2.size); in memblock_reserve_overlap_top_check()
659 ASSERT_EQ(rgn->base, r2.base); in memblock_reserve_overlap_top_check()
671 * A test that tries to mark two memory blocks r1 and r2 as reserved,
672 * where r2 overlaps with the end of r1 (that is
673 * r2.base < r1.base + r1.size):
676 * | | r1 | | r2 | |
680 * | r2.base
699 struct region r2 = { in memblock_reserve_overlap_bottom_check() local
706 total_size = (r2.base - r1.base) + r2.size; in memblock_reserve_overlap_bottom_check()
710 memblock_reserve(r2.base, r2.size); in memblock_reserve_overlap_bottom_check()
724 * A test that tries to mark two memory blocks r1 and r2 as reserved,
725 * where r2 is within the range of r1 (that is
726 * (r1.base < r2.base) && (r2.base + r2.size < r1.base + r1.size)):
729 * | | |r2| r1 |
733 * | r2.base
750 struct region r2 = { in memblock_reserve_within_check() local
759 memblock_reserve(r2.base, r2.size); in memblock_reserve_within_check()
804 * | | r1 | r3 | r2 | |
808 * r1.base and has size of r1.size + r2.size + r3.size. The region counter and
822 struct region r2 = { in memblock_reserve_between_check() local
833 total_size = r1.size + r2.size + r3.size; in memblock_reserve_between_check()
837 memblock_reserve(r2.base, r2.size); in memblock_reserve_between_check()
1267 * with the next region r2 in memblock.memory:
1270 * | : r1 : | r2 | |
1276 * Expect to add two memory blocks r1 and r2 and then remove r1 so that
1277 * r2 is the first available region. The region counter and total size
1290 struct region r2 = { in memblock_remove_simple_check() local
1299 memblock_add(r2.base, r2.size); in memblock_remove_simple_check()
1302 ASSERT_EQ(rgn->base, r2.base); 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()
1314 * A test that tries to remove a region r2 that was not registered as
1318 * | r2 |
1339 struct region r2 = { in memblock_remove_absent_check() local
1348 memblock_remove(r2.base, r2.size); in memblock_remove_absent_check()
1362 * A test that tries to remove a region r2 that overlaps with the
1364 * (that is r1.base < r2.base + r2.size):
1367 * | r2 |
1391 struct region r2 = { in memblock_remove_overlap_top_check() local
1399 r2_end = r2.base + r2.size; in memblock_remove_overlap_top_check()
1404 memblock_remove(r2.base, r2.size); in memblock_remove_overlap_top_check()
1406 ASSERT_EQ(rgn->base, r1.base + r2.base); in memblock_remove_overlap_top_check()
1418 * A test that tries to remove a region r2 that overlaps with the end of
1419 * the already existing region r1 (that is r2.base < r1.base + r1.size):
1422 * | r2 |
1445 struct region r2 = { in memblock_remove_overlap_bottom_check() local
1452 total_size = r2.base - r1.base; in memblock_remove_overlap_bottom_check()
1456 memblock_remove(r2.base, r2.size); in memblock_remove_overlap_bottom_check()
1470 * A test that tries to remove a region r2 that is within the range of
1472 * (r1.base < r2.base) && (r2.base + r2.size < r1.base + r1.size)):
1475 * | r2 |
1484 * Expect that the region is split into two - one that ends at r2.base and
1485 * another that starts at r2.base + r2.size, with appropriate sizes. The
1500 struct region r2 = { in memblock_remove_within_check() local
1507 r1_size = r2.base - r1.base; in memblock_remove_within_check()
1508 r2_size = (r1.base + r1.size) - (r2.base + r2.size); in memblock_remove_within_check()
1513 memblock_remove(r2.base, r2.size); in memblock_remove_within_check()
1518 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_remove_within_check()
1565 * A simple test that tries remove a region r2 from the array of available
1566 * memory regions when r2 extends past PHYS_ADDR_MAX:
1569 * | r2 |
1575 * Expect that only the portion between PHYS_ADDR_MAX and r2.base is removed.
1591 struct region r2 = { in memblock_remove_near_max_check() local
1598 total_size = r1.size - (PHYS_ADDR_MAX - r2.base); in memblock_remove_near_max_check()
1602 memblock_remove(r2.base, r2.size); in memblock_remove_near_max_check()
1617 * regions r1 and r2:
1623 * | | |r1 : : |r2 | |
1626 * Expect that only the intersections of r1 with r3 and r2 with r3 are removed
1642 struct region r2 = { in memblock_remove_overlap_two_check() local
1653 r2_end = r2.base + r2.size; in memblock_remove_overlap_two_check()
1661 memblock_add(r2.base, r2.size); in memblock_remove_overlap_two_check()
1701 * the next entry r2 in memblock.reserved:
1704 * | : r1 : | r2 | |
1711 * value of r2. The region counter and total size are updated.
1723 struct region r2 = { in memblock_free_simple_check() local
1732 memblock_reserve(r2.base, r2.size); in memblock_free_simple_check()
1735 ASSERT_EQ(rgn->base, r2.base); 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()
1747 * A test that tries to free a region r2 that was not marked as reserved
1751 * | r2 |
1772 struct region r2 = { in memblock_free_absent_check() local
1781 memblock_free((void *)r2.base, r2.size); in memblock_free_absent_check()
1795 * A test that tries to free a region r2 that overlaps with the beginning
1796 * of the already existing entry r1 (that is r1.base < r2.base + r2.size):
1799 * | r2 |
1824 struct region r2 = { in memblock_free_overlap_top_check() local
1831 total_size = (r1.size + r1.base) - (r2.base + r2.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()
1849 * A test that tries to free a region r2 that overlaps with the end of
1850 * the already existing entry r1 (that is r2.base < r1.base + r1.size):
1853 * | r2 |
1873 struct region r2 = { in memblock_free_overlap_bottom_check() local
1880 total_size = r2.base - r1.base; in memblock_free_overlap_bottom_check()
1884 memblock_free((void *)r2.base, r2.size); in memblock_free_overlap_bottom_check()
1898 * A test that tries to free a region r2 that is within the range of the
1900 * (r1.base < r2.base) && (r2.base + r2.size < r1.base + r1.size)):
1903 * | r2 |
1912 * Expect that the region is split into two - one that ends at r2.base and
1913 * another that starts at r2.base + r2.size, with appropriate sizes. The
1928 struct region r2 = { in memblock_free_within_check() local
1935 r1_size = r2.base - r1.base; in memblock_free_within_check()
1936 r2_size = (r1.base + r1.size) - (r2.base + r2.size); in memblock_free_within_check()
1941 memblock_free((void *)r2.base, r2.size); in memblock_free_within_check()
1946 ASSERT_EQ(rgn2->base, r2.base + r2.size); in memblock_free_within_check()
1993 * A simple test that tries free a region r2 when r2 extends past PHYS_ADDR_MAX:
1996 * | r2 |
2002 * Expect that only the portion between PHYS_ADDR_MAX and r2.base is freed.
2018 struct region r2 = { in memblock_free_near_max_check() local
2025 total_size = r1.size - (PHYS_ADDR_MAX - r2.base); in memblock_free_near_max_check()
2029 memblock_free((void *)r2.base, r2.size); in memblock_free_near_max_check()
2044 * existing reserved regions r1 and r2:
2050 * | | |r1 : : |r2 | |
2053 * Expect that only the intersections of r1 with r3 and r2 with r3 are freed
2069 struct region r2 = { in memblock_free_overlap_two_check() local
2080 r2_end = r2.base + r2.size; in memblock_free_overlap_two_check()
2088 memblock_reserve(r2.base, r2.size); in memblock_free_overlap_two_check()
2204 * r2. Region r1 is aligned on both ends and region r2 is unaligned on one end
2210 * | | r1 | | r2 | |
2217 * Expect that r1 will not be trimmed and r2 will be removed. Expect the
2231 struct region r2 = { in memblock_trim_memory_too_small_check() local
2240 memblock_add(r2.base, r2.size); in memblock_trim_memory_too_small_check()
2255 * r2. Region r1 is aligned on both ends and region r2 is unaligned at the base
2262 * | | r1 | | r2 | |
2269 * Expect that r1 will not be trimmed and r2 will be trimmed at the base.
2286 struct region r2 = { in memblock_trim_memory_unaligned_base_check() local
2293 new_r2_base = r2.base + (alignment - offset); in memblock_trim_memory_unaligned_base_check()
2294 new_r2_size = r2.size - (alignment - offset); in memblock_trim_memory_unaligned_base_check()
2298 memblock_add(r2.base, r2.size); in memblock_trim_memory_unaligned_base_check()
2316 * r2. Region r1 is aligned on both ends and region r2 is aligned at the base
2323 * | | r1 | | r2 | |
2330 * Expect that r1 will not be trimmed and r2 will be trimmed at the end.
2347 struct region r2 = { in memblock_trim_memory_unaligned_end_check() local
2354 new_r2_size = r2.size - (alignment - offset); in memblock_trim_memory_unaligned_end_check()
2358 memblock_add(r2.base, r2.size); in memblock_trim_memory_unaligned_end_check()
2364 ASSERT_EQ(rgn2->base, r2.base); in memblock_trim_memory_unaligned_end_check()