Home
last modified time | relevance | path

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

/kernel/linux/linux-5.10/mm/
Dsparse-vmemmap.c73 struct vmem_altmap *altmap);
77 struct vmem_altmap *altmap) in vmemmap_alloc_block_buf() argument
81 if (altmap) in vmemmap_alloc_block_buf()
82 return altmap_alloc_block_buf(size, altmap); in vmemmap_alloc_block_buf()
90 static unsigned long __meminit vmem_altmap_next_pfn(struct vmem_altmap *altmap) in vmem_altmap_next_pfn() argument
92 return altmap->base_pfn + altmap->reserve + altmap->alloc in vmem_altmap_next_pfn()
93 + altmap->align; in vmem_altmap_next_pfn()
96 static unsigned long __meminit vmem_altmap_nr_free(struct vmem_altmap *altmap) in vmem_altmap_nr_free() argument
98 unsigned long allocated = altmap->alloc + altmap->align; in vmem_altmap_nr_free()
100 if (altmap->free > allocated) in vmem_altmap_nr_free()
[all …]
Dsparse.c446 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in __populate_section_memmap() argument
652 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument
654 return __populate_section_memmap(pfn, nr_pages, nid, altmap); in populate_section_memmap()
658 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
663 vmemmap_free(start, end, altmap); in depopulate_section_memmap()
723 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument
730 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
798 struct vmem_altmap *altmap) in section_deactivate() argument
837 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate()
846 unsigned long nr_pages, struct vmem_altmap *altmap) in section_activate() argument
[all …]
Dmemremap.c182 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); in memunmap_pages()
280 PHYS_PFN(range_len(range)), params->altmap, in pagemap_range()
317 .altmap = pgmap_altmap(pgmap), in memremap_pages()
449 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument
452 if (altmap) in vmem_altmap_offset()
453 return altmap->reserve + altmap->free; in vmem_altmap_offset()
457 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns) in vmem_altmap_free() argument
459 altmap->alloc -= nr_pfns; in vmem_altmap_free()
Dmemory_hotplug.c316 struct vmem_altmap *altmap = params->altmap; in __add_pages() local
325 if (altmap) { in __add_pages()
329 if (altmap->base_pfn != pfn in __add_pages()
330 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages()
334 altmap->alloc = 0; in __add_pages()
345 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap); in __add_pages()
512 struct vmem_altmap *altmap) in __remove_section() argument
519 sparse_remove_section(ms, pfn, nr_pages, map_offset, altmap); in __remove_section()
534 struct vmem_altmap *altmap) in __remove_pages() argument
540 map_offset = vmem_altmap_offset(altmap); in __remove_pages()
[all …]
Dpage_alloc.c6214 struct vmem_altmap *altmap, int migratetype) in memmap_init_zone() argument
6231 if (!altmap) in memmap_init_zone()
6234 if (start_pfn == altmap->base_pfn) in memmap_init_zone()
6235 start_pfn += altmap->reserve; in memmap_init_zone()
6236 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone()
6278 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local
6291 if (altmap) { in memmap_init_zone_device()
6292 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device()
/kernel/linux/linux-5.10/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 - 1) > 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.c145 struct vmem_altmap *altmap) in arch_remove_memory() argument
151 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/kernel/linux/linux-5.10/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.h80 struct vmem_altmap *altmap; member
146 struct vmem_altmap *altmap);
148 struct vmem_altmap *altmap);
350 struct vmem_altmap *altmap, int migratetype);
356 unsigned long nr_pages, struct vmem_altmap *altmap);
359 unsigned long map_offset, struct vmem_altmap *altmap);
Dmm.h3068 unsigned long nr_pages, int nid, struct vmem_altmap *altmap);
3074 struct vmem_altmap *altmap);
3078 struct vmem_altmap *altmap);
3081 int node, struct vmem_altmap *altmap);
3083 struct vmem_altmap *altmap);
3087 struct vmem_altmap *altmap);
/kernel/linux/linux-5.10/arch/arm64/mm/
Dmmu.c817 struct vmem_altmap *altmap) in free_hotplug_page_range() argument
819 if (altmap) { in free_hotplug_page_range()
820 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_hotplug_page_range()
853 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument
868 PAGE_SIZE, altmap); in unmap_hotplug_pte_range()
874 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument
897 PMD_SIZE, altmap); in unmap_hotplug_pmd_range()
901 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); in unmap_hotplug_pmd_range()
907 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument
930 PUD_SIZE, altmap); in unmap_hotplug_pud_range()
[all …]
/kernel/linux/linux-5.10/arch/x86/mm/
Dinit_64.c897 struct vmem_altmap *altmap) in free_hugepage_table() argument
899 if (altmap) in free_hugepage_table()
900 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table()
1032 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument
1051 altmap); in remove_pmd_table()
1065 altmap); in remove_pmd_table()
1088 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument
1133 remove_pmd_table(pmd_base, addr, next, direct, altmap); in remove_pud_table()
1143 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument
1159 remove_pud_table(pud_base, addr, next, altmap, direct); in remove_p4d_table()
[all …]
Dinit_32.c822 struct vmem_altmap *altmap) in arch_remove_memory() argument
827 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/kernel/linux/linux-5.10/arch/s390/mm/
Dinit.c288 if (WARN_ON_ONCE(params->altmap)) in arch_add_memory()
305 struct vmem_altmap *altmap) in arch_remove_memory() argument
310 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
Dvmem.c507 struct vmem_altmap *altmap) in vmemmap_populate() argument
521 struct vmem_altmap *altmap) in vmemmap_free() argument
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/arch/sh/mm/
Dinit.c427 struct vmem_altmap *altmap) in arch_remove_memory() argument
432 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/kernel/linux/linux-5.10/arch/ia64/mm/
Ddiscontig.c655 struct vmem_altmap *altmap) in vmemmap_populate() argument
661 struct vmem_altmap *altmap) in vmemmap_free() argument
Dinit.c714 struct vmem_altmap *altmap) in arch_remove_memory() argument
719 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/kernel/linux/linux-5.10/arch/riscv/mm/
Dinit.c776 struct vmem_altmap *altmap) in vmemmap_populate() argument
/kernel/linux/linux-5.10/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