| /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() 406 if (altmap->base_pfn != pfn in __add_pages() 407 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages() 411 altmap->alloc = 0; in __add_pages() 423 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap, in __add_pages() 594 struct vmem_altmap *altmap) in __remove_pages() argument 609 sparse_remove_section(pfn, cur_nr_pages, altmap); in __remove_pages() 750 struct vmem_altmap *altmap, int migratetype, in move_pfn_range_to_zone() argument 783 MEMINIT_HOTPLUG, altmap, migratetype, in move_pfn_range_to_zone() [all …]
|
| H A D | mm_init.c | 878 struct vmem_altmap *altmap, int migratetype, in memmap_init_range() argument 896 if (!altmap) in memmap_init_range() 899 if (start_pfn == altmap->base_pfn) in memmap_init_range() 900 start_pfn += altmap->reserve; in memmap_init_range() 901 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_range() 1076 static inline unsigned long compound_nr_pages(struct vmem_altmap *altmap, in compound_nr_pages() argument 1079 if (!vmemmap_can_optimize(altmap, pgmap)) in compound_nr_pages() 1118 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local 1132 if (altmap) { in memmap_init_zone_device() 1133 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 …]
|
| H A D | init.c | 282 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 287 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
| /linux/arch/powerpc/mm/book3s64/ |
| H A D | radix_pgtable.c | 755 struct vmem_altmap *altmap, in free_vmemmap_pages() argument 760 if (altmap) { in free_vmemmap_pages() 769 alt_start = altmap->base_pfn; in free_vmemmap_pages() 770 alt_end = altmap->base_pfn + altmap->reserve + altmap->free; in free_vmemmap_pages() 773 vmem_altmap_free(altmap, nr_pages); in free_vmemmap_pages() 788 struct vmem_altmap *altmap) in remove_pte_table() argument 804 free_vmemmap_pages(pte_page(*pte), altmap, 0); in remove_pte_table() 810 free_vmemmap_pages(pte_page(*pte), altmap, 0); in remove_pte_table() 821 struct vmem_altmap *altmap) in remove_pmd_table() argument 838 free_vmemmap_pages(pmd_page(*pmd), altmap, get_order(PMD_SIZE)); in remove_pmd_table() [all …]
|
| /linux/arch/loongarch/mm/ |
| H A D | init.c | 96 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 103 if (altmap) in arch_remove_memory() 104 page += vmem_altmap_offset(altmap); in arch_remove_memory() 105 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory() 132 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument 142 void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) in vmemmap_free() argument
|
| /linux/arch/x86/mm/ |
| H A D | init_64.c | 1036 struct vmem_altmap *altmap) in free_hugepage_table() argument 1038 if (altmap) in free_hugepage_table() 1039 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table() 1143 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument 1161 altmap); in remove_pmd_table() 1169 altmap); in remove_pmd_table() 1189 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument 1213 remove_pmd_table(pmd_base, addr, next, direct, altmap); in remove_pud_table() 1223 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument 1239 remove_pud_table(pud_base, addr, next, altmap, direct); in remove_p4d_table() [all …]
|
| /linux/arch/riscv/mm/ |
| H A D | init.c | 1462 struct vmem_altmap *altmap) in vmemmap_populate() argument 1470 return vmemmap_populate_hugepages(start, end, node, altmap); in vmemmap_populate() 1638 struct vmem_altmap *altmap) in free_vmemmap_storage() argument 1642 if (altmap) { in free_vmemmap_storage() 1643 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_vmemmap_storage() 1659 bool is_vmemmap, struct vmem_altmap *altmap) in remove_pte_mapping() argument 1676 free_vmemmap_storage(pte_page(pte), PAGE_SIZE, altmap); in remove_pte_mapping() 1681 bool is_vmemmap, struct vmem_altmap *altmap) in remove_pmd_mapping() argument 1697 free_vmemmap_storage(pmd_page(pmd), PMD_SIZE, altmap); in remove_pmd_mapping() 1702 remove_pte_mapping(pte_base, addr, next, is_vmemmap, altmap); in remove_pmd_mapping() [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 | 4235 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 4242 struct vmem_altmap *altmap, unsigned long ptpfn, 4247 struct vmem_altmap *altmap); 4254 int node, struct vmem_altmap *altmap); 4256 int node, struct vmem_altmap *altmap); 4258 struct vmem_altmap *altmap); 4268 struct vmem_altmap *altmap); 4272 static inline unsigned long vmem_altmap_offset(const struct vmem_altmap *altmap) in vmem_altmap_offset() argument 4275 if (altmap) in vmem_altmap_offset() 4276 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/include/asm/ |
| H A D | pgtable.h | 180 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start,
|
| /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 | 2585 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
|