/Linux-v5.4/mm/ |
D | sparse-vmemmap.c | 83 static unsigned long __meminit vmem_altmap_next_pfn(struct vmem_altmap *altmap) in vmem_altmap_next_pfn() argument 85 return altmap->base_pfn + altmap->reserve + altmap->alloc in vmem_altmap_next_pfn() 86 + altmap->align; in vmem_altmap_next_pfn() 89 static unsigned long __meminit vmem_altmap_nr_free(struct vmem_altmap *altmap) in vmem_altmap_nr_free() argument 91 unsigned long allocated = altmap->alloc + altmap->align; in vmem_altmap_nr_free() 93 if (altmap->free > allocated) in vmem_altmap_nr_free() 94 return altmap->free - allocated; in vmem_altmap_nr_free() 106 struct vmem_altmap *altmap) in altmap_alloc_block_buf() argument 116 pfn = vmem_altmap_next_pfn(altmap); in altmap_alloc_block_buf() 120 if (nr_pfns + nr_align > vmem_altmap_nr_free(altmap)) in altmap_alloc_block_buf() [all …]
|
D | sparse.c | 452 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in __populate_section_memmap() argument 651 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument 653 return __populate_section_memmap(pfn, nr_pages, nid, altmap); in populate_section_memmap() 657 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 662 vmemmap_free(start, end, altmap); in depopulate_section_memmap() 673 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument 695 struct vmem_altmap *altmap) in depopulate_section_memmap() argument 738 struct vmem_altmap *altmap) in section_deactivate() argument 789 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate() 793 unsigned long nr_pages, struct vmem_altmap *altmap) in section_activate() argument [all …]
|
D | memremap.c | 134 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); in memunmap_pages() 165 .altmap = pgmap_altmap(pgmap), in memremap_pages() 292 PHYS_PFN(resource_size(res)), restrictions.altmap); in memremap_pages() 366 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument 369 if (altmap) in vmem_altmap_offset() 370 return altmap->reserve + altmap->free; in vmem_altmap_offset() 374 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns) in vmem_altmap_free() argument 376 altmap->alloc -= nr_pfns; in vmem_altmap_free()
|
D | memory_hotplug.c | 292 struct vmem_altmap *altmap = restrictions->altmap; in __add_pages() local 294 if (altmap) { in __add_pages() 298 if (altmap->base_pfn != pfn in __add_pages() 299 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages() 303 altmap->alloc = 0; in __add_pages() 317 err = sparse_add_section(nid, pfn, pfns, altmap); in __add_pages() 492 struct vmem_altmap *altmap) in __remove_section() argument 500 sparse_remove_section(ms, pfn, nr_pages, map_offset, altmap); in __remove_section() 516 unsigned long nr_pages, struct vmem_altmap *altmap) in __remove_pages() argument 521 map_offset = vmem_altmap_offset(altmap); in __remove_pages() [all …]
|
D | page_alloc.c | 5881 struct vmem_altmap *altmap) in memmap_init_zone() argument 5898 if (!altmap) in memmap_init_zone() 5901 if (start_pfn == altmap->base_pfn) in memmap_init_zone() 5902 start_pfn += altmap->reserve; in memmap_init_zone() 5903 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone() 5955 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local 5968 if (altmap) { in memmap_init_zone_device() 5969 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device()
|
/Linux-v5.4/arch/powerpc/mm/ |
D | init_64.c | 175 static bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, in altmap_cross_boundary() argument 181 if ((start_pfn + nr_pfn) > altmap->end_pfn) in altmap_cross_boundary() 184 if (start_pfn < altmap->base_pfn) in altmap_cross_boundary() 191 struct vmem_altmap *altmap) in vmemmap_populate() argument 212 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) { in vmemmap_populate() 213 p = altmap_alloc_block_buf(page_size, altmap); in vmemmap_populate() 272 struct vmem_altmap *altmap) in vmemmap_free() argument 280 if (altmap) { in vmemmap_free() 281 alt_start = altmap->base_pfn; in vmemmap_free() 282 alt_end = altmap->base_pfn + altmap->reserve + in vmemmap_free() [all …]
|
D | mem.c | 129 struct vmem_altmap *altmap) in arch_remove_memory() argument 133 struct page *page = pfn_to_page(start_pfn) + vmem_altmap_offset(altmap); in arch_remove_memory() 136 __remove_pages(page_zone(page), start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v5.4/include/linux/ |
D | memremap.h | 108 struct vmem_altmap altmap; member 121 return &pgmap->altmap; in pgmap_altmap() 133 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap); 134 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns); 159 static inline unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument 164 static inline void vmem_altmap_free(struct vmem_altmap *altmap, in vmem_altmap_free() argument
|
D | memory_hotplug.h | 63 struct vmem_altmap *altmap; member 127 struct vmem_altmap *altmap); 129 unsigned long nr_pages, struct vmem_altmap *altmap); 347 unsigned long nr_pages, struct vmem_altmap *altmap); 350 unsigned long nr_pages, struct vmem_altmap *altmap); 353 unsigned long map_offset, struct vmem_altmap *altmap);
|
D | mm.h | 2746 unsigned long nr_pages, int nid, struct vmem_altmap *altmap); 2755 void *altmap_alloc_block_buf(unsigned long size, struct vmem_altmap *altmap); 2760 struct vmem_altmap *altmap); 2764 struct vmem_altmap *altmap);
|
/Linux-v5.4/arch/x86/mm/ |
D | init_64.c | 895 struct vmem_altmap *altmap) in free_hugepage_table() argument 897 if (altmap) in free_hugepage_table() 898 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table() 1030 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument 1049 altmap); in remove_pmd_table() 1063 altmap); in remove_pmd_table() 1086 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument 1131 remove_pmd_table(pmd_base, addr, next, direct, altmap); in remove_pud_table() 1141 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument 1157 remove_pud_table(pud_base, addr, next, altmap, direct); in remove_p4d_table() [all …]
|
D | init_32.c | 864 struct vmem_altmap *altmap) in arch_remove_memory() argument 871 __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v5.4/arch/s390/mm/ |
D | init.c | 276 if (WARN_ON_ONCE(restrictions->altmap)) in arch_add_memory() 290 struct vmem_altmap *altmap) in arch_remove_memory() argument 297 __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
|
D | vmem.c | 214 struct vmem_altmap *altmap) in vmemmap_populate() argument 300 struct vmem_altmap *altmap) in vmemmap_free() argument
|
/Linux-v5.4/drivers/nvdimm/ |
D | pfn_devs.c | 666 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn() local 697 memcpy(altmap, &__altmap, sizeof(*altmap)); in __nvdimm_setup_pfn() 698 altmap->free = PHYS_PFN(offset - reserve); in __nvdimm_setup_pfn() 699 altmap->alloc = 0; in __nvdimm_setup_pfn()
|
/Linux-v5.4/arch/arm64/mm/ |
D | mmu.c | 731 struct vmem_altmap *altmap) in vmemmap_populate() argument 737 struct vmem_altmap *altmap) in vmemmap_populate() argument 773 struct vmem_altmap *altmap) in vmemmap_free() argument 1068 struct vmem_altmap *altmap) in arch_remove_memory() argument 1082 __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v5.4/arch/sh/mm/ |
D | init.c | 433 struct vmem_altmap *altmap) in arch_remove_memory() argument 440 __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v5.4/arch/ia64/mm/ |
D | discontig.c | 657 struct vmem_altmap *altmap) in vmemmap_populate() argument 663 struct vmem_altmap *altmap) in vmemmap_free() argument
|
D | init.c | 688 struct vmem_altmap *altmap) in arch_remove_memory() argument 695 __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/Linux-v5.4/arch/riscv/mm/ |
D | init.c | 464 struct vmem_altmap *altmap) in vmemmap_populate() argument
|
/Linux-v5.4/arch/sparc/mm/ |
D | init_64.c | 2597 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument 2641 struct vmem_altmap *altmap) in vmemmap_free() argument
|