8
8
9
9
static int memblock_initialization_check (void )
10
10
{
11
- reset_memblock ();
12
-
13
11
assert (memblock .memory .regions );
14
12
assert (memblock .memory .cnt == 1 );
15
13
assert (memblock .memory .max == EXPECTED_MEMBLOCK_REGIONS );
@@ -43,7 +41,7 @@ static int memblock_add_simple_check(void)
43
41
.size = SZ_4M
44
42
};
45
43
46
- reset_memblock ();
44
+ reset_memblock_regions ();
47
45
memblock_add (r .base , r .size );
48
46
49
47
assert (rgn -> base == r .base );
@@ -72,7 +70,7 @@ static int memblock_add_node_simple_check(void)
72
70
.size = SZ_16M
73
71
};
74
72
75
- reset_memblock ();
73
+ reset_memblock_regions ();
76
74
memblock_add_node (r .base , r .size , 1 , MEMBLOCK_HOTPLUG );
77
75
78
76
assert (rgn -> base == r .base );
@@ -110,7 +108,7 @@ static int memblock_add_disjoint_check(void)
110
108
.size = SZ_8K
111
109
};
112
110
113
- reset_memblock ();
111
+ reset_memblock_regions ();
114
112
memblock_add (r1 .base , r1 .size );
115
113
memblock_add (r2 .base , r2 .size );
116
114
@@ -151,7 +149,7 @@ static int memblock_add_overlap_top_check(void)
151
149
152
150
total_size = (r1 .base - r2 .base ) + r1 .size ;
153
151
154
- reset_memblock ();
152
+ reset_memblock_regions ();
155
153
memblock_add (r1 .base , r1 .size );
156
154
memblock_add (r2 .base , r2 .size );
157
155
@@ -190,7 +188,7 @@ static int memblock_add_overlap_bottom_check(void)
190
188
191
189
total_size = (r2 .base - r1 .base ) + r2 .size ;
192
190
193
- reset_memblock ();
191
+ reset_memblock_regions ();
194
192
memblock_add (r1 .base , r1 .size );
195
193
memblock_add (r2 .base , r2 .size );
196
194
@@ -225,7 +223,7 @@ static int memblock_add_within_check(void)
225
223
.size = SZ_1M
226
224
};
227
225
228
- reset_memblock ();
226
+ reset_memblock_regions ();
229
227
memblock_add (r1 .base , r1 .size );
230
228
memblock_add (r2 .base , r2 .size );
231
229
@@ -249,7 +247,7 @@ static int memblock_add_twice_check(void)
249
247
.size = SZ_2M
250
248
};
251
249
252
- reset_memblock ();
250
+ reset_memblock_regions ();
253
251
254
252
memblock_add (r .base , r .size );
255
253
memblock_add (r .base , r .size );
@@ -290,7 +288,7 @@ static int memblock_reserve_simple_check(void)
290
288
.size = SZ_128M
291
289
};
292
290
293
- reset_memblock ();
291
+ reset_memblock_regions ();
294
292
memblock_reserve (r .base , r .size );
295
293
296
294
assert (rgn -> base == r .base );
@@ -321,7 +319,7 @@ static int memblock_reserve_disjoint_check(void)
321
319
.size = SZ_512M
322
320
};
323
321
324
- reset_memblock ();
322
+ reset_memblock_regions ();
325
323
memblock_reserve (r1 .base , r1 .size );
326
324
memblock_reserve (r2 .base , r2 .size );
327
325
@@ -364,7 +362,7 @@ static int memblock_reserve_overlap_top_check(void)
364
362
365
363
total_size = (r1 .base - r2 .base ) + r1 .size ;
366
364
367
- reset_memblock ();
365
+ reset_memblock_regions ();
368
366
memblock_reserve (r1 .base , r1 .size );
369
367
memblock_reserve (r2 .base , r2 .size );
370
368
@@ -404,7 +402,7 @@ static int memblock_reserve_overlap_bottom_check(void)
404
402
405
403
total_size = (r2 .base - r1 .base ) + r2 .size ;
406
404
407
- reset_memblock ();
405
+ reset_memblock_regions ();
408
406
memblock_reserve (r1 .base , r1 .size );
409
407
memblock_reserve (r2 .base , r2 .size );
410
408
@@ -440,7 +438,7 @@ static int memblock_reserve_within_check(void)
440
438
.size = SZ_64K
441
439
};
442
440
443
- reset_memblock ();
441
+ reset_memblock_regions ();
444
442
memblock_reserve (r1 .base , r1 .size );
445
443
memblock_reserve (r2 .base , r2 .size );
446
444
@@ -465,7 +463,7 @@ static int memblock_reserve_twice_check(void)
465
463
.size = SZ_2M
466
464
};
467
465
468
- reset_memblock ();
466
+ reset_memblock_regions ();
469
467
470
468
memblock_reserve (r .base , r .size );
471
469
memblock_reserve (r .base , r .size );
@@ -511,7 +509,7 @@ static int memblock_remove_simple_check(void)
511
509
.size = SZ_4M
512
510
};
513
511
514
- reset_memblock ();
512
+ reset_memblock_regions ();
515
513
memblock_add (r1 .base , r1 .size );
516
514
memblock_add (r2 .base , r2 .size );
517
515
memblock_remove (r1 .base , r1 .size );
@@ -545,7 +543,7 @@ static int memblock_remove_absent_check(void)
545
543
.size = SZ_1G
546
544
};
547
545
548
- reset_memblock ();
546
+ reset_memblock_regions ();
549
547
memblock_add (r1 .base , r1 .size );
550
548
memblock_remove (r2 .base , r2 .size );
551
549
@@ -585,7 +583,7 @@ static int memblock_remove_overlap_top_check(void)
585
583
r2_end = r2 .base + r2 .size ;
586
584
total_size = r1_end - r2_end ;
587
585
588
- reset_memblock ();
586
+ reset_memblock_regions ();
589
587
memblock_add (r1 .base , r1 .size );
590
588
memblock_remove (r2 .base , r2 .size );
591
589
@@ -623,7 +621,7 @@ static int memblock_remove_overlap_bottom_check(void)
623
621
624
622
total_size = r2 .base - r1 .base ;
625
623
626
- reset_memblock ();
624
+ reset_memblock_regions ();
627
625
memblock_add (r1 .base , r1 .size );
628
626
memblock_remove (r2 .base , r2 .size );
629
627
@@ -665,7 +663,7 @@ static int memblock_remove_within_check(void)
665
663
r2_size = (r1 .base + r1 .size ) - (r2 .base + r2 .size );
666
664
total_size = r1_size + r2_size ;
667
665
668
- reset_memblock ();
666
+ reset_memblock_regions ();
669
667
memblock_add (r1 .base , r1 .size );
670
668
memblock_remove (r2 .base , r2 .size );
671
669
@@ -715,7 +713,7 @@ static int memblock_free_simple_check(void)
715
713
.size = SZ_1M
716
714
};
717
715
718
- reset_memblock ();
716
+ reset_memblock_regions ();
719
717
memblock_reserve (r1 .base , r1 .size );
720
718
memblock_reserve (r2 .base , r2 .size );
721
719
memblock_free ((void * )r1 .base , r1 .size );
@@ -749,7 +747,7 @@ static int memblock_free_absent_check(void)
749
747
.size = SZ_128M
750
748
};
751
749
752
- reset_memblock ();
750
+ reset_memblock_regions ();
753
751
memblock_reserve (r1 .base , r1 .size );
754
752
memblock_free ((void * )r2 .base , r2 .size );
755
753
@@ -787,7 +785,7 @@ static int memblock_free_overlap_top_check(void)
787
785
788
786
total_size = (r1 .size + r1 .base ) - (r2 .base + r2 .size );
789
787
790
- reset_memblock ();
788
+ reset_memblock_regions ();
791
789
memblock_reserve (r1 .base , r1 .size );
792
790
memblock_free ((void * )r2 .base , r2 .size );
793
791
@@ -824,7 +822,7 @@ static int memblock_free_overlap_bottom_check(void)
824
822
825
823
total_size = r2 .base - r1 .base ;
826
824
827
- reset_memblock ();
825
+ reset_memblock_regions ();
828
826
memblock_reserve (r1 .base , r1 .size );
829
827
memblock_free ((void * )r2 .base , r2 .size );
830
828
@@ -867,7 +865,7 @@ static int memblock_free_within_check(void)
867
865
r2_size = (r1 .base + r1 .size ) - (r2 .base + r2 .size );
868
866
total_size = r1_size + r2_size ;
869
867
870
- reset_memblock ();
868
+ reset_memblock_regions ();
871
869
memblock_reserve (r1 .base , r1 .size );
872
870
memblock_free ((void * )r2 .base , r2 .size );
873
871
0 commit comments