Lines Matching refs:altmap

74 					       struct vmem_altmap *altmap);
78 struct vmem_altmap *altmap) in vmemmap_alloc_block_buf() argument
82 if (altmap) in vmemmap_alloc_block_buf()
83 return altmap_alloc_block_buf(size, altmap); in vmemmap_alloc_block_buf()
91 static unsigned long __meminit vmem_altmap_next_pfn(struct vmem_altmap *altmap) in vmem_altmap_next_pfn() argument
93 return altmap->base_pfn + altmap->reserve + altmap->alloc in vmem_altmap_next_pfn()
94 + altmap->align; in vmem_altmap_next_pfn()
97 static unsigned long __meminit vmem_altmap_nr_free(struct vmem_altmap *altmap) in vmem_altmap_nr_free() argument
99 unsigned long allocated = altmap->alloc + altmap->align; in vmem_altmap_nr_free()
101 if (altmap->free > allocated) in vmem_altmap_nr_free()
102 return altmap->free - allocated; in vmem_altmap_nr_free()
107 struct vmem_altmap *altmap) in altmap_alloc_block_buf() argument
117 pfn = vmem_altmap_next_pfn(altmap); in altmap_alloc_block_buf()
121 if (nr_pfns + nr_align > vmem_altmap_nr_free(altmap)) in altmap_alloc_block_buf()
124 altmap->alloc += nr_pfns; in altmap_alloc_block_buf()
125 altmap->align += nr_align; in altmap_alloc_block_buf()
129 __func__, pfn, altmap->alloc, altmap->align, nr_pfns); in altmap_alloc_block_buf()
145 struct vmem_altmap *altmap, in vmemmap_pte_populate() argument
154 p = vmemmap_alloc_block_buf(PAGE_SIZE, node, altmap); in vmemmap_pte_populate()
246 struct vmem_altmap *altmap, in vmemmap_populate_address() argument
267 pte = vmemmap_pte_populate(pmd, addr, node, altmap, reuse); in vmemmap_populate_address()
277 struct vmem_altmap *altmap, in vmemmap_populate_range() argument
284 pte = vmemmap_populate_address(addr, node, altmap, reuse); in vmemmap_populate_range()
293 int node, struct vmem_altmap *altmap) in vmemmap_populate_basepages() argument
295 return vmemmap_populate_range(start, end, node, altmap, NULL); in vmemmap_populate_basepages()
310 int node, struct vmem_altmap *altmap) in vmemmap_populate_hugepages() argument
338 p = vmemmap_alloc_block_buf(PMD_SIZE, node, altmap); in vmemmap_populate_hugepages()
342 } else if (altmap) { in vmemmap_populate_hugepages()
355 if (vmemmap_populate_basepages(addr, next, node, altmap)) in vmemmap_populate_hugepages()
453 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in __populate_section_memmap() argument
464 if (vmemmap_can_optimize(altmap, pgmap)) in __populate_section_memmap()
467 r = vmemmap_populate(start, end, nid, altmap); in __populate_section_memmap()