/linux-6.12.1/mm/ |
D | sparse-vmemmap.c | 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() [all …]
|
D | sparse.c | 426 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in __populate_section_memmap() argument 634 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument 637 return __populate_section_memmap(pfn, nr_pages, nid, altmap, pgmap); in populate_section_memmap() 641 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 647 vmemmap_free(start, end, altmap); in depopulate_section_memmap() 707 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument 715 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 783 struct vmem_altmap *altmap) in section_deactivate() argument 823 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate() 832 unsigned long nr_pages, struct vmem_altmap *altmap, in section_activate() argument [all …]
|
D | memory_hotplug.c | 375 struct vmem_altmap *altmap = params->altmap; in __add_pages() local 382 if (altmap) { in __add_pages() 386 if (altmap->base_pfn != pfn in __add_pages() 387 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages() 391 altmap->alloc = 0; in __add_pages() 403 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap, in __add_pages() 574 struct vmem_altmap *altmap) in __remove_pages() argument 589 sparse_remove_section(pfn, cur_nr_pages, altmap); in __remove_pages() 746 struct vmem_altmap *altmap, int migratetype) in move_pfn_range_to_zone() argument 778 MEMINIT_HOTPLUG, altmap, migratetype); in move_pfn_range_to_zone() [all …]
|
D | mm_init.c | 852 struct vmem_altmap *altmap, int migratetype) in memmap_init_range() argument 869 if (!altmap) in memmap_init_range() 872 if (start_pfn == altmap->base_pfn) in memmap_init_range() 873 start_pfn += altmap->reserve; in memmap_init_range() 874 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_range() 1034 static inline unsigned long compound_nr_pages(struct vmem_altmap *altmap, in compound_nr_pages() argument 1037 if (!vmemmap_can_optimize(altmap, pgmap)) in compound_nr_pages() 1077 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local 1091 if (altmap) { in memmap_init_zone_device() 1092 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device() [all …]
|
D | memremap.c | 153 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); in memunmap_pages() 256 PHYS_PFN(range_len(range)), params->altmap, in pagemap_range() 295 .altmap = pgmap_altmap(pgmap), in memremap_pages()
|
/linux-6.12.1/arch/powerpc/mm/ |
D | init_64.c | 187 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, in altmap_cross_boundary() argument 193 if ((start_pfn + nr_pfn - 1) > altmap->end_pfn) in altmap_cross_boundary() 196 if (start_pfn < altmap->base_pfn) in altmap_cross_boundary() 203 struct vmem_altmap *altmap) in __vmemmap_populate() argument 231 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) { in __vmemmap_populate() 232 p = vmemmap_alloc_block_buf(page_size, node, altmap); in __vmemmap_populate() 256 vmem_altmap_free(altmap, nr_pfns); in __vmemmap_populate() 277 struct vmem_altmap *altmap) in vmemmap_populate() argument 282 return radix__vmemmap_populate(start, end, node, altmap); in vmemmap_populate() 285 return __vmemmap_populate(start, end, node, altmap); in vmemmap_populate() [all …]
|
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-6.12.1/arch/s390/mm/ |
D | vmem.c | 39 static void vmem_free_pages(unsigned long addr, int order, struct vmem_altmap *altmap) in vmem_free_pages() argument 41 if (altmap) { in vmem_free_pages() 42 vmem_altmap_free(altmap, 1 << order); in vmem_free_pages() 167 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 246 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); in modify_pmd_table() 250 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); in modify_pmd_table() 273 new_page = vmemmap_alloc_block_buf(PMD_SIZE, NUMA_NO_NODE, altmap); in modify_pmd_table() [all …]
|
D | init.c | 293 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 298 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/linux-6.12.1/arch/powerpc/mm/book3s64/ |
D | radix_pgtable.c | 767 struct vmem_altmap *altmap, in free_vmemmap_pages() argument 772 if (altmap) { in free_vmemmap_pages() 781 alt_start = altmap->base_pfn; in free_vmemmap_pages() 782 alt_end = altmap->base_pfn + altmap->reserve + altmap->free; in free_vmemmap_pages() 785 vmem_altmap_free(altmap, nr_pages); in free_vmemmap_pages() 800 struct vmem_altmap *altmap) in remove_pte_table() argument 816 free_vmemmap_pages(pte_page(*pte), altmap, 0); in remove_pte_table() 822 free_vmemmap_pages(pte_page(*pte), altmap, 0); in remove_pte_table() 833 struct vmem_altmap *altmap) in remove_pmd_table() argument 850 free_vmemmap_pages(pmd_page(*pmd), altmap, get_order(PMD_SIZE)); in remove_pmd_table() [all …]
|
/linux-6.12.1/arch/loongarch/mm/ |
D | init.c | 109 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 116 if (altmap) in arch_remove_memory() 117 page += vmem_altmap_offset(altmap); in arch_remove_memory() 118 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory() 153 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument 163 void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) in vmemmap_free() argument
|
/linux-6.12.1/include/linux/ |
D | memory_hotplug.h | 85 struct vmem_altmap *altmap; member 156 extern void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap); 158 struct vmem_altmap *altmap); 316 struct vmem_altmap *altmap, int migratetype); 321 unsigned long nr_pages, struct vmem_altmap *altmap, 324 struct vmem_altmap *altmap);
|
D | memory.h | 80 struct vmem_altmap *altmap; member 156 struct vmem_altmap *altmap,
|
D | memremap.h | 128 struct vmem_altmap altmap; member 151 return &pgmap->altmap; in pgmap_altmap()
|
D | mm.h | 3819 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 3829 struct vmem_altmap *altmap, struct page *reuse); 3833 struct vmem_altmap *altmap); 3840 int node, struct vmem_altmap *altmap); 3842 int node, struct vmem_altmap *altmap); 3844 struct vmem_altmap *altmap); 3848 struct vmem_altmap *altmap); 3852 static inline unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument 3855 if (altmap) in vmem_altmap_offset() 3856 return altmap->reserve + altmap->free; in vmem_altmap_offset() [all …]
|
/linux-6.12.1/arch/arm64/mm/ |
D | mmu.c | 820 struct vmem_altmap *altmap) in free_hotplug_page_range() argument 822 if (altmap) { in free_hotplug_page_range() 823 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_hotplug_page_range() 856 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument 871 PAGE_SIZE, altmap); in unmap_hotplug_pte_range() 877 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument 900 PMD_SIZE, altmap); in unmap_hotplug_pmd_range() 904 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); in unmap_hotplug_pmd_range() 910 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument 933 PUD_SIZE, altmap); in unmap_hotplug_pud_range() [all …]
|
/linux-6.12.1/arch/x86/mm/ |
D | init_64.c | 1007 struct vmem_altmap *altmap) in free_hugepage_table() argument 1009 if (altmap) in free_hugepage_table() 1010 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table() 1114 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument 1132 altmap); in remove_pmd_table() 1142 altmap); in remove_pmd_table() 1163 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument 1187 remove_pmd_table(pmd_base, addr, next, direct, altmap); in remove_pud_table() 1197 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument 1213 remove_pud_table(pud_base, addr, next, altmap, direct); in remove_p4d_table() [all …]
|
/linux-6.12.1/drivers/base/ |
D | memory.c | 109 WARN_ON(mem->altmap); in memory_block_release() 208 if (mem->altmap) in memory_block_online() 209 nr_vmemmap_pages = mem->altmap->free; in memory_block_online() 223 zone, mem->altmap->inaccessible); in memory_block_online() 272 if (mem->altmap) in memory_block_offline() 273 nr_vmemmap_pages = mem->altmap->free; in memory_block_offline() 779 struct vmem_altmap *altmap, in add_memory_block() argument 797 mem->altmap = altmap; in add_memory_block() 840 struct vmem_altmap *altmap, in add_hotplug_memory_block() argument 843 return add_memory_block(block_id, MEM_OFFLINE, altmap, group); in add_hotplug_memory_block() [all …]
|
/linux-6.12.1/arch/riscv/mm/ |
D | init.c | 1435 struct vmem_altmap *altmap) in vmemmap_populate() argument 1443 return vmemmap_populate_hugepages(start, end, node, altmap); in vmemmap_populate() 1610 struct vmem_altmap *altmap) in free_vmemmap_storage() argument 1614 if (altmap) { in free_vmemmap_storage() 1615 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_vmemmap_storage() 1631 bool is_vmemmap, struct vmem_altmap *altmap) in remove_pte_mapping() argument 1648 free_vmemmap_storage(pte_page(pte), PAGE_SIZE, altmap); in remove_pte_mapping() 1653 bool is_vmemmap, struct vmem_altmap *altmap) in remove_pmd_mapping() argument 1669 free_vmemmap_storage(pmd_page(pmd), PMD_SIZE, altmap); in remove_pmd_mapping() 1674 remove_pte_mapping(pte_base, addr, next, is_vmemmap, altmap); in remove_pmd_mapping() [all …]
|
/linux-6.12.1/arch/powerpc/include/asm/book3s/64/ |
D | radix.h | 334 int node, struct vmem_altmap *altmap); 336 struct vmem_altmap *altmap); 367 bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
|
/linux-6.12.1/drivers/nvdimm/ |
D | pfn_devs.c | 685 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn() local 717 memcpy(altmap, &__altmap, sizeof(*altmap)); in __nvdimm_setup_pfn() 718 altmap->free = PHYS_PFN(offset - reserve); in __nvdimm_setup_pfn() 719 altmap->alloc = 0; in __nvdimm_setup_pfn()
|
/linux-6.12.1/arch/powerpc/include/asm/ |
D | pgtable.h | 193 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start,
|
/linux-6.12.1/Documentation/ABI/testing/ |
D | sysfs-bus-dax | 145 the 'altmap' for the hotplugged memory will be placed on the
|
/linux-6.12.1/Documentation/mm/ |
D | vmemmap_dedup.rst | 190 the device (altmap).
|
/linux-6.12.1/arch/sparc/mm/ |
D | init_64.c | 2589 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
|