Home
last modified time | relevance | path

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

12

/linux-6.6.21/mm/
Dsparse-vmemmap.c74 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 …]
Dsparse.c429 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
635 return __populate_section_memmap(pfn, nr_pages, nid, altmap, pgmap); in populate_section_memmap()
639 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
644 vmemmap_free(start, end, altmap); in depopulate_section_memmap()
704 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument
712 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
780 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 …]
Dmemory_hotplug.c375 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()
751 struct vmem_altmap *altmap, int migratetype) in move_pfn_range_to_zone() argument
783 MEMINIT_HOTPLUG, altmap, migratetype); in move_pfn_range_to_zone()
[all …]
Dmemremap.c152 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()
Dmm_init.c851 struct vmem_altmap *altmap, int migratetype) in memmap_init_range() argument
868 if (!altmap) in memmap_init_range()
871 if (start_pfn == altmap->base_pfn) in memmap_init_range()
872 start_pfn += altmap->reserve; in memmap_init_range()
873 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_range()
1027 static inline unsigned long compound_nr_pages(struct vmem_altmap *altmap, in compound_nr_pages() argument
1030 if (!vmemmap_can_optimize(altmap, pgmap)) in compound_nr_pages()
1070 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local
1084 if (altmap) { in memmap_init_zone_device()
1085 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device()
[all …]
/linux-6.6.21/arch/powerpc/mm/
Dinit_64.c187 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 …]
Dmem.c157 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-6.6.21/include/linux/
Dmemremap.h127 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
Dmemory_hotplug.h117 struct vmem_altmap *altmap; member
187 extern void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap);
189 struct vmem_altmap *altmap);
342 struct vmem_altmap *altmap, int migratetype);
347 unsigned long nr_pages, struct vmem_altmap *altmap,
350 struct vmem_altmap *altmap);
Dmemory.h80 struct vmem_altmap *altmap; member
146 struct vmem_altmap *altmap,
Dmm.h3758 unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
3767 struct vmem_altmap *altmap, struct page *reuse);
3771 struct vmem_altmap *altmap);
3778 int node, struct vmem_altmap *altmap);
3780 int node, struct vmem_altmap *altmap);
3782 struct vmem_altmap *altmap);
3786 struct vmem_altmap *altmap);
3791 static inline bool __vmemmap_can_optimize(struct vmem_altmap *altmap, in __vmemmap_can_optimize() argument
3806 return !altmap && (nr_vmemmap_pages > VMEMMAP_RESERVE_NR); in __vmemmap_can_optimize()
3816 static inline bool vmemmap_can_optimize(struct vmem_altmap *altmap, in vmemmap_can_optimize() argument
/linux-6.6.21/arch/powerpc/mm/book3s64/
Dradix_pgtable.c691 struct vmem_altmap *altmap, in free_vmemmap_pages() argument
696 if (altmap) { in free_vmemmap_pages()
705 alt_start = altmap->base_pfn; in free_vmemmap_pages()
706 alt_end = altmap->base_pfn + altmap->reserve + altmap->free; in free_vmemmap_pages()
709 vmem_altmap_free(altmap, nr_pages); in free_vmemmap_pages()
724 struct vmem_altmap *altmap) in remove_pte_table() argument
740 free_vmemmap_pages(pte_page(*pte), altmap, 0); in remove_pte_table()
746 free_vmemmap_pages(pte_page(*pte), altmap, 0); in remove_pte_table()
757 struct vmem_altmap *altmap) in remove_pmd_table() argument
774 free_vmemmap_pages(pmd_page(*pmd), altmap, get_order(PMD_SIZE)); in remove_pmd_table()
[all …]
/linux-6.6.21/arch/loongarch/mm/
Dinit.c108 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
115 if (altmap) in arch_remove_memory()
116 page += vmem_altmap_offset(altmap); in arch_remove_memory()
117 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
152 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
162 void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) in vmemmap_free() argument
/linux-6.6.21/arch/arm64/mm/
Dmmu.c815 struct vmem_altmap *altmap) in free_hotplug_page_range() argument
817 if (altmap) { in free_hotplug_page_range()
818 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_hotplug_page_range()
851 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument
866 PAGE_SIZE, altmap); in unmap_hotplug_pte_range()
872 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument
895 PMD_SIZE, altmap); in unmap_hotplug_pmd_range()
899 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); in unmap_hotplug_pmd_range()
905 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument
928 PUD_SIZE, altmap); in unmap_hotplug_pud_range()
[all …]
/linux-6.6.21/arch/x86/mm/
Dinit_64.c997 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-6.6.21/drivers/base/
Dmemory.c109 WARN_ON(mem->altmap); in memory_block_release()
207 if (mem->altmap) in memory_block_online()
208 nr_vmemmap_pages = mem->altmap->free; in memory_block_online()
256 if (mem->altmap) in memory_block_offline()
257 nr_vmemmap_pages = mem->altmap->free; in memory_block_offline()
758 struct vmem_altmap *altmap, in add_memory_block() argument
776 mem->altmap = altmap; in add_memory_block()
819 struct vmem_altmap *altmap, in add_hotplug_memory_block() argument
822 return add_memory_block(block_id, MEM_OFFLINE, altmap, group); in add_hotplug_memory_block()
850 struct vmem_altmap *altmap, in create_memory_block_devices() argument
[all …]
/linux-6.6.21/arch/s390/mm/
Dinit.c288 if (WARN_ON_ONCE(params->altmap)) in arch_add_memory()
305 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
310 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
Dvmem.c492 struct vmem_altmap *altmap) in vmemmap_populate() argument
506 struct vmem_altmap *altmap) in vmemmap_free() argument
/linux-6.6.21/arch/powerpc/include/asm/book3s/64/
Dradix.h334 int node, struct vmem_altmap *altmap);
336 struct vmem_altmap *altmap);
369 bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
/linux-6.6.21/drivers/nvdimm/
Dpfn_devs.c685 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.6.21/arch/sh/mm/
Dinit.c418 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
423 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/linux-6.6.21/arch/powerpc/include/asm/
Dpgtable.h174 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start,
/linux-6.6.21/arch/ia64/mm/
Dinit.c499 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
504 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
Ddiscontig.c626 struct vmem_altmap *altmap) in vmemmap_populate() argument
632 struct vmem_altmap *altmap) in vmemmap_free() argument
/linux-6.6.21/Documentation/mm/
Dvmemmap_dedup.rst210 the device (altmap).

12