Home
last modified time | relevance | path

Searched refs:altmap (Results 1 – 21 of 21) sorted by relevance

/Linux-v5.15/arch/powerpc/mm/
Dinit_64.c185 static bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, in altmap_cross_boundary() argument
191 if ((start_pfn + nr_pfn) > altmap->end_pfn) in altmap_cross_boundary()
194 if (start_pfn < altmap->base_pfn) in altmap_cross_boundary()
201 struct vmem_altmap *altmap) in vmemmap_populate() argument
229 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) { in vmemmap_populate()
230 p = vmemmap_alloc_block_buf(page_size, node, altmap); in vmemmap_populate()
254 vmem_altmap_free(altmap, nr_pfns); in vmemmap_populate()
306 struct vmem_altmap *altmap) in vmemmap_free() argument
314 if (altmap) { in vmemmap_free()
315 alt_start = altmap->base_pfn; in vmemmap_free()
[all …]
Dmem.c122 void __ref arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
127 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/Linux-v5.15/mm/
Dsparse-vmemmap.c427 struct vmem_altmap *altmap);
431 struct vmem_altmap *altmap) in vmemmap_alloc_block_buf() argument
435 if (altmap) in vmemmap_alloc_block_buf()
436 return altmap_alloc_block_buf(size, altmap); in vmemmap_alloc_block_buf()
444 static unsigned long __meminit vmem_altmap_next_pfn(struct vmem_altmap *altmap) in vmem_altmap_next_pfn() argument
446 return altmap->base_pfn + altmap->reserve + altmap->alloc in vmem_altmap_next_pfn()
447 + altmap->align; in vmem_altmap_next_pfn()
450 static unsigned long __meminit vmem_altmap_nr_free(struct vmem_altmap *altmap) in vmem_altmap_nr_free() argument
452 unsigned long allocated = altmap->alloc + altmap->align; in vmem_altmap_nr_free()
454 if (altmap->free > allocated) in vmem_altmap_nr_free()
[all …]
Dsparse.c430 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in __populate_section_memmap() argument
632 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument
634 return __populate_section_memmap(pfn, nr_pages, nid, altmap); in populate_section_memmap()
638 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
643 vmemmap_free(start, end, altmap); in depopulate_section_memmap()
703 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument
710 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
778 struct vmem_altmap *altmap) in section_deactivate() argument
817 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate()
826 unsigned long nr_pages, struct vmem_altmap *altmap) in section_activate() argument
[all …]
Dmemremap.c179 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); in memunmap_pages()
283 PHYS_PFN(range_len(range)), params->altmap, in pagemap_range()
320 .altmap = pgmap_altmap(pgmap), in memremap_pages()
451 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument
454 if (altmap) in vmem_altmap_offset()
455 return altmap->reserve + altmap->free; in vmem_altmap_offset()
459 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns) in vmem_altmap_free() argument
461 altmap->alloc -= nr_pfns; in vmem_altmap_free()
Dmemory_hotplug.c311 struct vmem_altmap *altmap = params->altmap; in __add_pages() local
318 if (altmap) { in __add_pages()
322 if (altmap->base_pfn != pfn in __add_pages()
323 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages()
327 altmap->alloc = 0; in __add_pages()
338 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap); in __add_pages()
498 struct vmem_altmap *altmap) in __remove_section() argument
505 sparse_remove_section(ms, pfn, nr_pages, map_offset, altmap); in __remove_section()
520 struct vmem_altmap *altmap) in __remove_pages() argument
526 map_offset = vmem_altmap_offset(altmap); in __remove_pages()
[all …]
Dpage_alloc.c6502 struct vmem_altmap *altmap, int migratetype) in memmap_init_range() argument
6519 if (!altmap) in memmap_init_range()
6522 if (start_pfn == altmap->base_pfn) in memmap_init_range()
6523 start_pfn += altmap->reserve; in memmap_init_range()
6524 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_range()
6566 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local
6579 if (altmap) { in memmap_init_zone_device()
6580 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device()
/Linux-v5.15/include/linux/
Dmemremap.h111 struct vmem_altmap altmap; member
129 return &pgmap->altmap; in pgmap_altmap()
142 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap);
143 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns);
174 static inline unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument
179 static inline void vmem_altmap_free(struct vmem_altmap *altmap, in vmem_altmap_free() argument
Dmemory_hotplug.h67 struct vmem_altmap *altmap; member
141 extern void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap);
143 struct vmem_altmap *altmap);
339 struct vmem_altmap *altmap, int migratetype);
345 unsigned long nr_pages, struct vmem_altmap *altmap);
348 unsigned long map_offset, struct vmem_altmap *altmap);
Dmm.h3087 unsigned long nr_pages, int nid, struct vmem_altmap *altmap);
3093 struct vmem_altmap *altmap);
3097 struct vmem_altmap *altmap);
3100 int node, struct vmem_altmap *altmap);
3102 struct vmem_altmap *altmap);
3106 struct vmem_altmap *altmap);
/Linux-v5.15/arch/arm64/mm/
Dmmu.c796 struct vmem_altmap *altmap) in free_hotplug_page_range() argument
798 if (altmap) { in free_hotplug_page_range()
799 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_hotplug_page_range()
832 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument
847 PAGE_SIZE, altmap); in unmap_hotplug_pte_range()
853 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument
876 PMD_SIZE, altmap); in unmap_hotplug_pmd_range()
880 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); in unmap_hotplug_pmd_range()
886 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument
909 PUD_SIZE, altmap); in unmap_hotplug_pud_range()
[all …]
/Linux-v5.15/arch/x86/mm/
Dinit_64.c996 struct vmem_altmap *altmap) in free_hugepage_table() argument
998 if (altmap) in free_hugepage_table()
999 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table()
1103 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument
1121 altmap); in remove_pmd_table()
1131 altmap); in remove_pmd_table()
1152 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument
1176 remove_pmd_table(pmd_base, addr, next, direct, altmap); in remove_pud_table()
1186 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument
1202 remove_pud_table(pud_base, addr, next, altmap, direct); in remove_p4d_table()
[all …]
Dinit_32.c804 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
809 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/Linux-v5.15/arch/s390/mm/
Dinit.c293 if (WARN_ON_ONCE(params->altmap)) in arch_add_memory()
310 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
315 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
Dvmem.c508 struct vmem_altmap *altmap) in vmemmap_populate() argument
522 struct vmem_altmap *altmap) in vmemmap_free() argument
/Linux-v5.15/drivers/nvdimm/
Dpfn_devs.c676 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn() local
708 memcpy(altmap, &__altmap, sizeof(*altmap)); in __nvdimm_setup_pfn()
709 altmap->free = PHYS_PFN(offset - reserve); in __nvdimm_setup_pfn()
710 altmap->alloc = 0; in __nvdimm_setup_pfn()
/Linux-v5.15/arch/sh/mm/
Dinit.c417 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-v5.15/arch/ia64/mm/
Dinit.c487 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
492 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
Ddiscontig.c633 struct vmem_altmap *altmap) in vmemmap_populate() argument
639 struct vmem_altmap *altmap) in vmemmap_free() argument
/Linux-v5.15/arch/riscv/mm/
Dinit.c853 struct vmem_altmap *altmap) in vmemmap_populate() argument
/Linux-v5.15/arch/sparc/mm/
Dinit_64.c2582 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
2631 struct vmem_altmap *altmap) in vmemmap_free() argument