• Home
  • Raw
  • Download

Lines Matching full:regions

35  * Memblock is a method of managing memory regions during the early
40 * regions. There are several types of these collections:
46 * * ``reserved`` - describes the regions that were allocated
54 * which contains an array of memory regions along with
62 * arrays during addition of new regions. This feature should be used
112 .memory.regions = memblock_memory_init_regions,
117 .reserved.regions = memblock_reserved_init_regions,
128 .regions = memblock_physmem_init_regions,
144 for (i = 0, rgn = &memblock_type->regions[0]; \
146 i++, rgn = &memblock_type->regions[i])
188 if (memblock_addrs_overlap(base, size, type->regions[i].base, in memblock_overlaps_region()
189 type->regions[i].size)) in memblock_overlaps_region()
341 type->total_size -= type->regions[r].size; in memblock_remove_region()
342 memmove(&type->regions[r], &type->regions[r + 1], in memblock_remove_region()
343 (type->cnt - (r + 1)) * sizeof(type->regions[r])); in memblock_remove_region()
350 type->regions[0].base = 0; in memblock_remove_region()
351 type->regions[0].size = 0; in memblock_remove_region()
352 type->regions[0].flags = 0; in memblock_remove_region()
353 memblock_set_region_node(&type->regions[0], MAX_NUMNODES); in memblock_remove_region()
365 if (memblock.reserved.regions != memblock_reserved_init_regions) { in memblock_discard()
366 addr = __pa(memblock.reserved.regions); in memblock_discard()
370 kfree(memblock.reserved.regions); in memblock_discard()
375 if (memblock.memory.regions != memblock_memory_init_regions) { in memblock_discard()
376 addr = __pa(memblock.memory.regions); in memblock_discard()
380 kfree(memblock.memory.regions); in memblock_discard()
390 * memblock_double_array - double the size of the memblock regions array
391 * @type: memblock type of the regions array being doubled
395 * Double the size of the @type regions array. If memblock is being used to
396 * allocate memory for a new reserved regions array and there is a previously
414 /* We don't allow resizing until we know about the reserved regions in memblock_double_array()
441 /* only exclude range when trying to double reserved.regions */ in memblock_double_array()
470 memcpy(new_array, type->regions, old_size); in memblock_double_array()
472 old_array = type->regions; in memblock_double_array()
473 type->regions = new_array; in memblock_double_array()
497 * memblock_merge_regions - merge neighboring compatible regions
500 * Scan @type and merge neighboring compatible regions.
508 struct memblock_region *this = &type->regions[i]; in memblock_merge_regions()
509 struct memblock_region *next = &type->regions[i + 1]; in memblock_merge_regions()
545 struct memblock_region *rgn = &type->regions[idx]; in memblock_insert_region()
567 * existing regions. @type is guaranteed to be minimal (all neighbouring
568 * compatible regions are merged) after the addition.
587 if (type->regions[0].size == 0) { in memblock_add_range()
589 type->regions[0].base = base; in memblock_add_range()
590 type->regions[0].size = size; in memblock_add_range()
591 type->regions[0].flags = flags; in memblock_add_range()
592 memblock_set_region_node(&type->regions[0], nid); in memblock_add_range()
599 * then with %true. The first counts the number of regions needed in memblock_add_range()
706 * Walk @type and ensure that regions don't cross the boundaries defined by
707 * [@base, @base + @size). Crossing regions are split at the boundaries,
708 * which may create at most two more regions. The index of the first
727 /* we'll create at most two more regions */ in memblock_isolate_range()
862 struct memblock_region *r = &type->regions[i]; in memblock_setclr_flag()
942 /* we never skip regions when iterating memblock.reserved or physmem */ in should_skip_region()
946 /* only memory regions are associated with nodes, check it */ in should_skip_region()
950 /* skip hotpluggable memory regions if needed */ in should_skip_region()
955 /* if we want mirror memory skip non-mirror memory regions */ in should_skip_region()
980 * areas before each region in type_b. For example, if type_b regions
985 * The upper 32bit indexes the following regions.
1005 struct memblock_region *m = &type_a->regions[idx_a]; in __next_mem_range()
1032 r = &type_b->regions[idx_b]; in __next_mem_range()
1043 /* if the two regions intersect, we're done */ in __next_mem_range()
1109 struct memblock_region *m = &type_a->regions[idx_a]; in __next_mem_range_rev()
1136 r = &type_b->regions[idx_b]; in __next_mem_range_rev()
1147 /* if the two regions intersect, we're done */ in __next_mem_range_rev()
1180 r = &type->regions[*idx]; in __next_mem_pfn_range()
1202 * memblock_set_node - set node ID on memblock regions
1208 * Set the nid of memblock @type regions in [@base, @base + @size) to @nid.
1209 * Regions which cross the area boundaries are split as necessary.
1226 memblock_set_region_node(&type->regions[i], nid); in memblock_set_node()
1314 * from the regions with mirroring enabled and then retried from any
1622 return memblock.memory.regions[0].base; in memblock_start_of_DRAM()
1629 return (memblock.memory.regions[idx].base + memblock.memory.regions[idx].size); in memblock_end_of_DRAM()
1639 * the memory memblock regions, if the @limit exceeds the total size in __find_max_addr()
1640 * of those regions, max_addr will keep original value PHYS_ADDR_MAX in __find_max_addr()
1666 /* truncate both memory and reserved regions */ in memblock_enforce_memory_limit()
1686 /* remove all the MAP regions */ in memblock_cap_memory_range()
1688 if (!memblock_is_nomap(&memblock.memory.regions[i])) in memblock_cap_memory_range()
1692 if (!memblock_is_nomap(&memblock.memory.regions[i])) in memblock_cap_memory_range()
1695 /* truncate the reserved regions */ in memblock_cap_memory_range()
1724 if (addr < type->regions[mid].base) in memblock_search()
1726 else if (addr >= (type->regions[mid].base + in memblock_search()
1727 type->regions[mid].size)) in memblock_search()
1751 return !memblock_is_nomap(&memblock.memory.regions[i]); in memblock_is_map_memory()
1763 *start_pfn = PFN_DOWN(type->regions[mid].base); in memblock_search_pfn_nid()
1764 *end_pfn = PFN_DOWN(type->regions[mid].base + type->regions[mid].size); in memblock_search_pfn_nid()
1766 return memblock_get_region_node(&type->regions[mid]); in memblock_search_pfn_nid()
1786 return (memblock.memory.regions[idx].base + in memblock_is_region_memory()
1787 memblock.memory.regions[idx].size) >= end; in memblock_is_region_memory()
1825 r - memblock.memory.regions); in memblock_trim_memory()
2004 reg = &type->regions[i]; in memblock_debug_show()