/Linux-v6.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 | 430 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in __populate_section_memmap() argument 633 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument 636 return __populate_section_memmap(pfn, nr_pages, nid, altmap, pgmap); in populate_section_memmap() 640 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 645 vmemmap_free(start, end, altmap); in depopulate_section_memmap() 705 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument 713 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 781 struct vmem_altmap *altmap) in section_deactivate() argument 820 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate() 829 unsigned long nr_pages, struct vmem_altmap *altmap, in section_activate() argument [all …]
|
D | memremap.c | 152 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); in memunmap_pages() 255 PHYS_PFN(range_len(range)), params->altmap, in pagemap_range() 294 .altmap = pgmap_altmap(pgmap), in memremap_pages() 425 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument 428 if (altmap) in vmem_altmap_offset() 429 return altmap->reserve + altmap->free; in vmem_altmap_offset() 433 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns) in vmem_altmap_free() argument 435 altmap->alloc -= nr_pfns; in vmem_altmap_free()
|
D | memory_hotplug.c | 308 struct vmem_altmap *altmap = params->altmap; in __add_pages() local 315 if (altmap) { in __add_pages() 319 if (altmap->base_pfn != pfn in __add_pages() 320 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages() 324 altmap->alloc = 0; in __add_pages() 336 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap, in __add_pages() 497 struct vmem_altmap *altmap) in __remove_section() argument 504 sparse_remove_section(ms, pfn, nr_pages, map_offset, altmap); in __remove_section() 519 struct vmem_altmap *altmap) in __remove_pages() argument 525 map_offset = vmem_altmap_offset(altmap); in __remove_pages() [all …]
|
D | page_alloc.c | 6739 struct vmem_altmap *altmap, int migratetype) in memmap_init_range() argument 6756 if (!altmap) in memmap_init_range() 6759 if (start_pfn == altmap->base_pfn) in memmap_init_range() 6760 start_pfn += altmap->reserve; in memmap_init_range() 6761 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_range() 6852 static inline unsigned long compound_nr_pages(struct vmem_altmap *altmap, in compound_nr_pages() argument 6856 !altmap ? 2 * (PAGE_SIZE / sizeof(struct page)) : nr_pages; in compound_nr_pages() 6895 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local 6909 if (altmap) { in memmap_init_zone_device() 6910 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device() [all …]
|
/Linux-v6.1/arch/powerpc/mm/ |
D | init_64.c | 186 static bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, in altmap_cross_boundary() argument 192 if ((start_pfn + nr_pfn) > altmap->end_pfn) in altmap_cross_boundary() 195 if (start_pfn < altmap->base_pfn) in altmap_cross_boundary() 202 struct vmem_altmap *altmap) in vmemmap_populate() argument 230 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) { in vmemmap_populate() 231 p = vmemmap_alloc_block_buf(page_size, node, altmap); in vmemmap_populate() 255 vmem_altmap_free(altmap, nr_pfns); in vmemmap_populate() 307 struct vmem_altmap *altmap) in vmemmap_free() argument 315 if (altmap) { in vmemmap_free() 316 alt_start = altmap->base_pfn; in vmemmap_free() [all …]
|
D | mem.c | 157 void __ref arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 162 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v6.1/include/linux/ |
D | memremap.h | 127 struct vmem_altmap altmap; member 150 return &pgmap->altmap; in pgmap_altmap() 199 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap); 200 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns); 231 static inline unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument 236 static inline void vmem_altmap_free(struct vmem_altmap *altmap, in vmem_altmap_free() argument
|
D | memory_hotplug.h | 115 struct vmem_altmap *altmap; member 185 extern void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap); 187 struct vmem_altmap *altmap); 343 struct vmem_altmap *altmap, int migratetype); 348 unsigned long nr_pages, struct vmem_altmap *altmap, 352 unsigned long map_offset, struct vmem_altmap *altmap);
|
D | mm.h | 3255 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 3262 struct vmem_altmap *altmap, struct page *reuse); 3266 struct vmem_altmap *altmap); 3269 int node, struct vmem_altmap *altmap); 3271 struct vmem_altmap *altmap); 3275 struct vmem_altmap *altmap);
|
/Linux-v6.1/arch/arm64/mm/ |
D | mmu.c | 866 struct vmem_altmap *altmap) in free_hotplug_page_range() argument 868 if (altmap) { in free_hotplug_page_range() 869 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_hotplug_page_range() 902 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument 917 PAGE_SIZE, altmap); in unmap_hotplug_pte_range() 923 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument 946 PMD_SIZE, altmap); in unmap_hotplug_pmd_range() 950 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); in unmap_hotplug_pmd_range() 956 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument 979 PUD_SIZE, altmap); in unmap_hotplug_pud_range() [all …]
|
/Linux-v6.1/arch/x86/mm/ |
D | init_64.c | 997 struct vmem_altmap *altmap) in free_hugepage_table() argument 999 if (altmap) in free_hugepage_table() 1000 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table() 1104 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument 1122 altmap); in remove_pmd_table() 1132 altmap); in remove_pmd_table() 1153 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument 1177 remove_pmd_table(pmd_base, addr, next, direct, altmap); in remove_pud_table() 1187 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument 1203 remove_pud_table(pud_base, addr, next, altmap, direct); in remove_p4d_table() [all …]
|
/Linux-v6.1/arch/loongarch/mm/ |
D | init.c | 134 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 141 if (altmap) in arch_remove_memory() 142 page += vmem_altmap_offset(altmap); in arch_remove_memory() 143 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v6.1/arch/s390/mm/ |
D | init.c | 285 if (WARN_ON_ONCE(params->altmap)) in arch_add_memory() 302 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 307 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
D | vmem.c | 508 struct vmem_altmap *altmap) in vmemmap_populate() argument 522 struct vmem_altmap *altmap) in vmemmap_free() argument
|
/Linux-v6.1/drivers/nvdimm/ |
D | pfn_devs.c | 678 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn() local 710 memcpy(altmap, &__altmap, sizeof(*altmap)); in __nvdimm_setup_pfn() 711 altmap->free = PHYS_PFN(offset - reserve); in __nvdimm_setup_pfn() 712 altmap->alloc = 0; in __nvdimm_setup_pfn()
|
/Linux-v6.1/arch/sh/mm/ |
D | init.c | 417 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 422 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v6.1/arch/ia64/mm/ |
D | init.c | 485 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument 490 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
D | discontig.c | 626 struct vmem_altmap *altmap) in vmemmap_populate() argument 632 struct vmem_altmap *altmap) in vmemmap_free() argument
|
/Linux-v6.1/Documentation/mm/ |
D | vmemmap_dedup.rst | 209 the device (altmap).
|
/Linux-v6.1/arch/sparc/mm/ |
D | init_64.c | 2583 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument 2632 struct vmem_altmap *altmap) in vmemmap_free() argument
|
/Linux-v6.1/arch/riscv/mm/ |
D | init.c | 1240 struct vmem_altmap *altmap) in vmemmap_populate() argument
|