Lines Matching +full:reserved +full:- +full:memory

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 * Logical memory blocks.
28 * enum memblock_flags - definition of memory region attributes
30 * @MEMBLOCK_HOTPLUG: memory region indicated in the firmware-provided memory
31 * map during early boot as hot(un)pluggable system RAM (e.g., memory range
33 * commandline, try keeping this memory region hotunpluggable. Does not apply
37 * reserved in the memory map; refer to memblock_mark_nomap() description
39 * @MEMBLOCK_DRIVER_MANAGED: memory region that is always detected and added
40 * via a driver, and never indicated in the firmware-provided memory map as
53 * struct memblock_region - represents a memory region
56 * @flags: memory region attributes
69 * struct memblock_type - collection of memory regions of certain type
74 * @name: the memory type symbolic name
85 * struct memblock - memblock allocator metadata
88 * @memory: usable memory regions
89 * @reserved: reserved memory regions
94 struct memblock_type memory; member
95 struct memblock_type reserved; member
158 * for_each_physmem_range - iterate through physmem areas not included in type.
171 * __for_each_mem_range - iterate through memblock areas from type_a and not
177 * @flags: pick from blocks based on memory attributes
191 * __for_each_mem_range_rev - reverse iterate through memblock areas from
197 * @flags: pick from blocks based on memory attributes
212 * for_each_mem_range - iterate through memory areas.
218 __for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \
223 * for_each_mem_range_rev - reverse iterate through memblock areas from
230 __for_each_mem_range_rev(i, &memblock.memory, NULL, NUMA_NO_NODE, \
235 * for_each_reserved_mem_range - iterate over all reserved memblock areas
240 * Walks over reserved areas of memblock. Available as soon as memblock
244 __for_each_mem_range(i, &memblock.reserved, NULL, NUMA_NO_NODE, \
249 return m->flags & MEMBLOCK_HOTPLUG; in memblock_is_hotpluggable()
254 return m->flags & MEMBLOCK_MIRROR; in memblock_is_mirror()
259 return m->flags & MEMBLOCK_NOMAP; in memblock_is_nomap()
264 return m->flags & MEMBLOCK_DRIVER_MANAGED; in memblock_is_driver_managed()
273 * for_each_mem_pfn_range - early memory pfn range iterator
280 * Walks over configured memory ranges.
283 for (i = -1, __next_mem_pfn_range(&i, nid, p_start, p_end, p_nid); \
291 * for_each_free_mem_pfn_range_in_zone - iterate through zone specific free
294 * @zone: zone in which all of the memory blocks reside
298 * Walks over free (memory && !reserved) areas of memblock in a specific
311 * for_each_free_mem_pfn_range_in_zone_from - iterate through zone specific
314 * @zone: zone in which all of the memory blocks reside
318 * Walks over free (memory && !reserved) areas of memblock in a specific
331 * for_each_free_mem_range - iterate through free memblock areas
334 * @flags: pick from blocks based on memory attributes
339 * Walks over free (memory && !reserved) areas of memblock. Available as
343 __for_each_mem_range(i, &memblock.memory, &memblock.reserved, \
347 * for_each_free_mem_range_reverse - rev-iterate through free memblock areas
350 * @flags: pick from blocks based on memory attributes
355 * Walks over free (memory && !reserved) areas of memblock in reverse
360 __for_each_mem_range_rev(i, &memblock.memory, &memblock.reserved, \
369 r->nid = nid; in memblock_set_region_node()
374 return r->nid; in memblock_get_region_node()
460 * Set the allocation direction to bottom-up or top-down.
468 * Check if the allocation direction is bottom-up or not.
469 * if this is true, that said, memblock will allocate memory
470 * in bottom-up direction.
493 * memblock_set_current_limit - Set the current allocation limit to allow
506 * While the memory MEMBLOCKs should always be page aligned, the reserved
512 * memblock_region_memory_base_pfn - get the lowest pfn of the memory region
515 * Return: the lowest pfn intersecting with the memory region
519 return PFN_UP(reg->base); in memblock_region_memory_base_pfn()
523 * memblock_region_memory_end_pfn - get the end pfn of the memory region
526 * Return: the end_pfn of the reserved region
530 return PFN_DOWN(reg->base + reg->size); in memblock_region_memory_end_pfn()
534 * memblock_region_reserved_base_pfn - get the lowest pfn of the reserved region
537 * Return: the lowest pfn intersecting with the reserved region
541 return PFN_DOWN(reg->base); in memblock_region_reserved_base_pfn()
545 * memblock_region_reserved_end_pfn - get the end pfn of the reserved region
548 * Return: the end_pfn of the reserved region
552 return PFN_UP(reg->base + reg->size); in memblock_region_reserved_end_pfn()
556 * for_each_mem_region - itereate over memory regions
560 for (region = memblock.memory.regions; \
561 region < (memblock.memory.regions + memblock.memory.cnt); \
565 * for_each_reserved_mem_region - itereate over reserved memory regions
569 for (region = memblock.reserved.regions; \
570 region < (memblock.reserved.regions + memblock.reserved.cnt); \