| /linux/mm/ |
| H A D | sparse-vmemmap.c | 84 struct vmem_altmap *altmap); 88 struct vmem_altmap *altmap) in vmemmap_alloc_block_buf() argument 92 if (altmap) in vmemmap_alloc_block_buf() 93 return altmap_alloc_block_buf(size, altmap); in vmemmap_alloc_block_buf() 101 static unsigned long __meminit vmem_altmap_next_pfn(struct vmem_altmap *altmap) in vmem_altmap_next_pfn() argument 103 return altmap->base_pfn + altmap->reserve + altmap->alloc in vmem_altmap_next_pfn() 104 + altmap->align; in vmem_altmap_next_pfn() 107 static unsigned long __meminit vmem_altmap_nr_free(struct vmem_altmap *altmap) in vmem_altmap_nr_free() argument 109 unsigned long allocated = altmap->alloc + altmap->align; in vmem_altmap_nr_free() 111 if (altmap->free > allocated) in vmem_altmap_nr_free() [all …]
|
| H A D | memory_hotplug.c | 395 struct vmem_altmap *altmap = params->altmap; in __add_pages() local 402 if (altmap) { in __add_pages() 404 * Validate altmap is within bounds of the total request in __add_pages() 406 if (altmap->base_pfn != pfn in __add_pages() 407 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages() 408 pr_warn_once("memory add fail, invalid altmap\n"); in __add_pages() 411 altmap->alloc = 0; in __add_pages() 423 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap, in __add_pages() 586 * @altmap 594 __remove_pages(unsigned long pfn,unsigned long nr_pages,struct vmem_altmap * altmap) __remove_pages() argument 750 move_pfn_range_to_zone(struct zone * zone,unsigned long start_pfn,unsigned long nr_pages,struct vmem_altmap * altmap,int migratetype,bool isolate_pageblock) move_pfn_range_to_zone() argument 1417 struct vmem_altmap *altmap = NULL; remove_memory_blocks_and_altmaps() local [all...] |
| H A D | mm_init.c | 875 struct vmem_altmap *altmap, int migratetype, in memmap_init_range() argument 893 if (!altmap) in memmap_init_range() 896 if (start_pfn == altmap->base_pfn) in memmap_init_range() 897 start_pfn += altmap->reserve; in memmap_init_range() 898 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_range() 1073 static inline unsigned long compound_nr_pages(struct vmem_altmap *altmap, in compound_nr_pages() argument 1076 if (!vmemmap_can_optimize(altmap, pgmap)) in compound_nr_pages() 1115 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local 1129 if (altmap) { in memmap_init_zone_device() 1130 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device() [all …]
|
| H A D | memremap.c | 128 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); in memunmap_pages() 230 PHYS_PFN(range_len(range)), params->altmap, in pagemap_range() 269 .altmap = pgmap_altmap(pgmap), in memremap_pages()
|
| /linux/arch/s390/mm/ |
| H A D | vmem.c | 41 static void vmem_free_pages(unsigned long addr, int order, struct vmem_altmap *altmap) in vmem_free_pages() argument 46 if (altmap) { in vmem_free_pages() 47 vmem_altmap_free(altmap, 1 << order); in vmem_free_pages() 170 struct vmem_altmap *altmap) in modify_pte_table() argument 183 vmem_free_pages((unsigned long)pfn_to_virt(pte_pfn(*pte)), get_order(PAGE_SIZE), altmap); in modify_pte_table() 187 void *new_page = vmemmap_alloc_block_buf(PAGE_SIZE, NUMA_NO_NODE, altmap); in modify_pte_table() 225 struct vmem_altmap *altmap) in modify_pmd_table() argument 243 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); in modify_pmd_table() 247 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); in modify_pmd_table() 270 new_page = vmemmap_alloc_block_buf(PMD_SIZE, NUMA_NO_NODE, altmap); in modify_pmd_table() [all …]
|
| /linux/arch/arm64/mm/ |
| H A D | mmu.c | 1413 struct vmem_altmap *altmap) in free_hotplug_page_range() argument 1415 if (altmap) { in free_hotplug_page_range() 1416 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_hotplug_page_range() 1449 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument 1464 PAGE_SIZE, altmap); in unmap_hotplug_pte_range() 1470 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument 1493 PMD_SIZE, altmap); in unmap_hotplug_pmd_range() 1497 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); in unmap_hotplug_pmd_range() 1503 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument 1526 PUD_SIZE, altmap); in unmap_hotplug_pud_range() [all …]
|
| /linux/drivers/base/ |
| H A D | memory.c | 96 WARN_ON(mem->altmap); in memory_block_release() 245 if (mem->altmap) in memory_block_online() 246 nr_vmemmap_pages = mem->altmap->free; in memory_block_online() 294 if (mem->altmap) in memory_block_offline() 295 nr_vmemmap_pages = mem->altmap->free; in memory_block_offline() 792 struct vmem_altmap *altmap, in add_memory_block() argument 810 mem->altmap = altmap; in add_memory_block() 861 int nid, struct vmem_altmap *altmap, in create_memory_block_devices() argument 875 ret = add_memory_block(block_id, nid, MEM_OFFLINE, altmap, group); in create_memory_block_devices()
|
| /linux/arch/powerpc/include/asm/book3s/64/ |
| H A D | radix.h | 324 int node, struct vmem_altmap *altmap); 326 struct vmem_altmap *altmap); 357 bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
|
| /linux/include/linux/ |
| H A D | memory.h | 90 struct vmem_altmap *altmap; member 155 int nid, struct vmem_altmap *altmap,
|
| H A D | memremap.h | 134 struct vmem_altmap altmap; member 157 return &pgmap->altmap; in pgmap_altmap()
|
| H A D | mm.h | 4487 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 4494 struct vmem_altmap *altmap, unsigned long ptpfn, 4499 struct vmem_altmap *altmap); 4506 int node, struct vmem_altmap *altmap); 4508 int node, struct vmem_altmap *altmap); 4510 struct vmem_altmap *altmap); 4520 struct vmem_altmap *altmap); 4524 static inline unsigned long vmem_altmap_offset(const struct vmem_altmap *altmap) in vmem_altmap_offset() argument 4527 if (altmap) in vmem_altmap_offset() 4528 return altmap->reserve + altmap->free; in vmem_altmap_offset() [all …]
|
| /linux/drivers/nvdimm/ |
| H A D | pfn_devs.c | 675 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn() local 707 memcpy(altmap, &__altmap, sizeof(*altmap)); in __nvdimm_setup_pfn() 708 altmap->free = PHYS_PFN(offset - reserve); in __nvdimm_setup_pfn() 709 altmap->alloc = 0; in __nvdimm_setup_pfn()
|
| /linux/arch/powerpc/mm/ |
| H A D | mem.c | 164 void __ref arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 169 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-bus-dax | 145 the 'altmap' for the hotplugged memory will be placed on the
|
| /linux/arch/sparc/mm/ |
| H A D | init_64.c | 2572 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
|