| /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 | sparse.c | 418 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in __populate_section_memmap() argument 670 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument 673 return __populate_section_memmap(pfn, nr_pages, nid, altmap, pgmap); in populate_section_memmap() 677 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 682 vmemmap_free(start, end, altmap); in depopulate_section_memmap() 742 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument 750 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 818 struct vmem_altmap *altmap) in section_deactivate() argument 859 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate() 871 unsigned long nr_pages, struct vmem_altmap *altmap, in section_activate() argument [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/powerpc/mm/ |
| H A D | init_64.c | 188 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, in altmap_cross_boundary() argument 194 if ((start_pfn + nr_pfn - 1) > altmap->end_pfn) in altmap_cross_boundary() 197 if (start_pfn < altmap->base_pfn) in altmap_cross_boundary() 204 struct vmem_altmap *altmap) in __vmemmap_populate() argument 232 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) { in __vmemmap_populate() 233 p = vmemmap_alloc_block_buf(page_size, node, altmap); in __vmemmap_populate() 257 vmem_altmap_free(altmap, nr_pfns); in __vmemmap_populate() 278 struct vmem_altmap *altmap) in vmemmap_populate() argument 283 return radix__vmemmap_populate(start, end, node, altmap); in vmemmap_populate() 286 return __vmemmap_populate(start, end, node, altmap); in vmemmap_populate() [all …]
|
| H A D | mem.c | 160 void __ref arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 165 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
| /linux/arch/s390/mm/ |
| H A D | vmem.c | 40 static void vmem_free_pages(unsigned long addr, int order, struct vmem_altmap *altmap) in vmem_free_pages() argument 42 if (altmap) { in vmem_free_pages() 43 vmem_altmap_free(altmap, 1 << order); in vmem_free_pages() 167 struct vmem_altmap *altmap) in modify_pte_table() argument 180 vmem_free_pages((unsigned long)pfn_to_virt(pte_pfn(*pte)), get_order(PAGE_SIZE), altmap); in modify_pte_table() 184 void *new_page = vmemmap_alloc_block_buf(PAGE_SIZE, NUMA_NO_NODE, altmap); in modify_pte_table() 222 struct vmem_altmap *altmap) in modify_pmd_table() argument 240 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); in modify_pmd_table() 244 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); in modify_pmd_table() 267 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/include/linux/ |
| H A D | memory_hotplug.h | 85 struct vmem_altmap *altmap; member 154 extern void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap); 156 struct vmem_altmap *altmap); 317 struct vmem_altmap *altmap, int migratetype, 323 unsigned long nr_pages, struct vmem_altmap *altmap, 326 struct vmem_altmap *altmap);
|
| H A D | memory.h | 80 struct vmem_altmap *altmap; member 162 int nid, struct vmem_altmap *altmap,
|
| H A D | memremap.h | 128 struct vmem_altmap altmap; member 151 return &pgmap->altmap; in pgmap_altmap()
|
| H A D | mm.h | 3913 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 3920 struct vmem_altmap *altmap, unsigned long ptpfn, 3925 struct vmem_altmap *altmap); 3932 int node, struct vmem_altmap *altmap); 3934 int node, struct vmem_altmap *altmap); 3936 struct vmem_altmap *altmap); 3946 struct vmem_altmap *altmap); 3950 static inline unsigned long vmem_altmap_offset(const struct vmem_altmap *altmap) in vmem_altmap_offset() argument 3953 if (altmap) in vmem_altmap_offset() 3954 return altmap->reserve + altmap->free; in vmem_altmap_offset() [all …]
|
| /linux/arch/x86/mm/ |
| H A D | init_64.c | 1039 struct vmem_altmap *altmap) in free_hugepage_table() argument 1041 if (altmap) in free_hugepage_table() 1042 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table() 1146 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument 1164 altmap); in remove_pmd_table() 1172 altmap); in remove_pmd_table() 1192 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument 1216 remove_pmd_table(pmd_base, addr, next, direct, altmap); in remove_pud_table() 1226 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument 1242 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/arch/arm64/mm/ |
| H A D | mmu.c | 1363 struct vmem_altmap *altmap) in free_hotplug_page_range() argument 1365 if (altmap) { in free_hotplug_page_range() 1366 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_hotplug_page_range() 1399 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument 1414 PAGE_SIZE, altmap); in unmap_hotplug_pte_range() 1420 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument 1443 PMD_SIZE, altmap); in unmap_hotplug_pmd_range() 1447 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); in unmap_hotplug_pmd_range() 1453 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument 1476 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() 246 if (mem->altmap) in memory_block_online() 247 nr_vmemmap_pages = mem->altmap->free; in memory_block_online() 261 zone, mem->altmap->inaccessible); in memory_block_online() 310 if (mem->altmap) in memory_block_offline() 311 nr_vmemmap_pages = mem->altmap->free; in memory_block_offline() 813 struct vmem_altmap *altmap, in add_memory_block() argument 831 mem->altmap = altmap; in add_memory_block() 882 int nid, struct vmem_altmap *altmap, in create_memory_block_devices() argument 896 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/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/Documentation/mm/ |
| H A D | vmemmap_dedup.rst | 190 the device (altmap).
|
| /linux/arch/sparc/mm/ |
| H A D | init_64.c | 2585 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
|