Lines Matching defs:altmap
376 struct vmem_altmap *altmap = params->altmap;
383 if (altmap) {
385 * Validate altmap is within bounds of the total request
387 if (altmap->base_pfn != pfn
388 || vmem_altmap_offset(altmap) > nr_pages) {
389 pr_warn_once("memory add fail, invalid altmap\n");
392 altmap->alloc = 0;
404 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap,
567 * @altmap: alternative device page map or %NULL if default memmap is used
575 struct vmem_altmap *altmap)
590 sparse_remove_section(pfn, cur_nr_pages, altmap);
752 struct vmem_altmap *altmap, int migratetype)
784 MEMINIT_HOTPLUG, altmap, migratetype);
1350 * to populate memory from the altmap for unrelated parts (i.e.,
1362 * altmap as an alternative source of memory, and we do not exactly
1370 * so that we always allocate vmemmap memory from altmap area.
1448 params.altmap = kmalloc(sizeof(struct vmem_altmap), GFP_KERNEL);
1449 if (!params.altmap) {
1454 memcpy(params.altmap, &mhp_altmap, sizeof(mhp_altmap));
1456 /* fallback to not using altmap */
1465 ret = create_memory_block_devices(start, size, params.altmap, group);
1467 arch_remove_memory(start, size, params.altmap);
1506 kfree(params.altmap);
2079 * return the memblock if we have altmap
2082 if (mem->altmap) {
2163 struct vmem_altmap *altmap = NULL;
2193 altmap = mem->altmap;
2195 * Mark altmap NULL so that we can add a debug
2198 mem->altmap = NULL;
2213 arch_remove_memory(start, size, altmap);
2216 if (altmap) {
2217 WARN(altmap->alloc, "Altmap not fully unmapped");
2218 kfree(altmap);