Home
last modified time | relevance | path

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

/linux-6.15/mm/
H A Dsparse-vmemmap.c88 struct vmem_altmap *altmap) in vmemmap_alloc_block_buf() argument
92 if (altmap) in vmemmap_alloc_block_buf()
103 return altmap->base_pfn + altmap->reserve + altmap->alloc in vmem_altmap_next_pfn()
104 + altmap->align; in vmem_altmap_next_pfn()
109 unsigned long allocated = altmap->alloc + altmap->align; in vmem_altmap_nr_free()
111 if (altmap->free > allocated) in vmem_altmap_nr_free()
112 return altmap->free - allocated; in vmem_altmap_nr_free()
134 altmap->alloc += nr_pfns; in altmap_alloc_block_buf()
135 altmap->align += nr_align; in altmap_alloc_block_buf()
139 __func__, pfn, altmap->alloc, altmap->align, nr_pfns); in altmap_alloc_block_buf()
[all …]
H A Dsparse.c678 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
684 vmemmap_free(start, end, altmap); in depopulate_section_memmap()
752 struct vmem_altmap *altmap) in depopulate_section_memmap() argument
820 struct vmem_altmap *altmap) in section_deactivate() argument
860 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate()
869 unsigned long nr_pages, struct vmem_altmap *altmap, in section_activate() argument
904 section_deactivate(pfn, nr_pages, altmap); in section_activate()
931 unsigned long nr_pages, struct vmem_altmap *altmap, in sparse_add_section() argument
951 if (!altmap || !altmap->inaccessible) in sparse_add_section()
967 struct vmem_altmap *altmap) in sparse_remove_section() argument
[all …]
H A Dmemory_hotplug.c394 struct vmem_altmap *altmap = params->altmap; in __add_pages() local
401 if (altmap) { in __add_pages()
405 if (altmap->base_pfn != pfn in __add_pages()
410 altmap->alloc = 0; in __add_pages()
1434 altmap = mem->altmap; in remove_memory_blocks_and_altmaps()
1435 mem->altmap = NULL; in remove_memory_blocks_and_altmaps()
1443 kfree(altmap); in remove_memory_blocks_and_altmaps()
1468 if (!params.altmap) { in create_altmaps_and_memory_blocks()
1476 kfree(params.altmap); in create_altmaps_and_memory_blocks()
1485 kfree(params.altmap); in create_altmaps_and_memory_blocks()
[all …]
H A Dmm_init.c878 struct vmem_altmap *altmap, int migratetype) in memmap_init_range() argument
895 if (!altmap) in memmap_init_range()
898 if (start_pfn == altmap->base_pfn) in memmap_init_range()
899 start_pfn += altmap->reserve; in memmap_init_range()
900 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_range()
1073 static inline unsigned long compound_nr_pages(struct vmem_altmap *altmap, in compound_nr_pages() argument
1076 if (!vmemmap_can_optimize(altmap, pgmap)) in compound_nr_pages()
1116 struct vmem_altmap *altmap = pgmap_altmap(pgmap); in memmap_init_zone_device() local
1130 if (altmap) { in memmap_init_zone_device()
1131 start_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); in memmap_init_zone_device()
[all …]
H A Dmemremap.c153 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); in memunmap_pages()
256 PHYS_PFN(range_len(range)), params->altmap, in pagemap_range()
295 .altmap = pgmap_altmap(pgmap), in memremap_pages()
/linux-6.15/arch/powerpc/mm/
H A Dinit_64.c197 if (start_pfn < altmap->base_pfn) in altmap_cross_boundary()
204 struct vmem_altmap *altmap) in __vmemmap_populate() argument
232 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) { in __vmemmap_populate()
257 vmem_altmap_free(altmap, nr_pfns); in __vmemmap_populate()
278 struct vmem_altmap *altmap) in vmemmap_populate() argument
321 struct vmem_altmap *altmap) in __vmemmap_free() argument
329 if (altmap) { in __vmemmap_free()
330 alt_start = altmap->base_pfn; in __vmemmap_free()
331 alt_end = altmap->base_pfn + altmap->reserve + altmap->free; in __vmemmap_free()
358 vmem_altmap_free(altmap, nr_pages); in __vmemmap_free()
[all …]
H A Dmem.c160 void __ref arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
165 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/linux-6.15/arch/s390/mm/
H A Dvmem.c42 if (altmap) { in vmem_free_pages()
43 vmem_altmap_free(altmap, 1 << order); in vmem_free_pages()
168 struct vmem_altmap *altmap) in modify_pte_table() argument
223 struct vmem_altmap *altmap) in modify_pmd_table() argument
425 bool direct, struct vmem_altmap *altmap) in modify_pagetable() argument
464 struct vmem_altmap *altmap) in add_pagetable() argument
470 struct vmem_altmap *altmap) in remove_pagetable() argument
497 struct vmem_altmap *altmap) in vmemmap_populate() argument
505 remove_pagetable(start, end, false, altmap); in vmemmap_populate()
513 struct vmem_altmap *altmap) in vmemmap_free() argument
[all …]
H A Dinit.c283 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
288 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
/linux-6.15/arch/powerpc/mm/book3s64/
H A Dradix_pgtable.c755 struct vmem_altmap *altmap, in free_vmemmap_pages() argument
760 if (altmap) { in free_vmemmap_pages()
769 alt_start = altmap->base_pfn; in free_vmemmap_pages()
770 alt_end = altmap->base_pfn + altmap->reserve + altmap->free; in free_vmemmap_pages()
895 struct vmem_altmap *altmap) in remove_pagetable() argument
1030 if (altmap && altmap_cross_boundary(altmap, addr, PAGE_SIZE)) in radix__vmemmap_pte_populate()
1031 altmap = NULL; in radix__vmemmap_pte_populate()
1034 if (!p && altmap) in radix__vmemmap_pte_populate()
1114 struct vmem_altmap *altmap) in radix__vmemmap_populate() argument
1176 } else if (altmap) { in radix__vmemmap_populate()
[all …]
/linux-6.15/arch/loongarch/mm/
H A Dinit.c98 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
105 if (altmap) in arch_remove_memory()
106 page += vmem_altmap_offset(altmap); in arch_remove_memory()
107 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
142 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
152 void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) in vmemmap_free() argument
/linux-6.15/include/linux/
H A Dmemory_hotplug.h85 struct vmem_altmap *altmap; member
154 extern void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap);
156 struct vmem_altmap *altmap);
317 struct vmem_altmap *altmap, int migratetype);
322 unsigned long nr_pages, struct vmem_altmap *altmap,
325 struct vmem_altmap *altmap);
H A Dmemory.h80 struct vmem_altmap *altmap; member
156 struct vmem_altmap *altmap,
H A Dmemremap.h128 struct vmem_altmap altmap; member
151 return &pgmap->altmap; in pgmap_altmap()
H A Dmm.h3929 unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
3936 struct vmem_altmap *altmap, unsigned long ptpfn,
3941 struct vmem_altmap *altmap);
3948 int node, struct vmem_altmap *altmap);
3950 int node, struct vmem_altmap *altmap);
3952 struct vmem_altmap *altmap);
3962 struct vmem_altmap *altmap);
3969 if (altmap) in vmem_altmap_offset()
3970 return altmap->reserve + altmap->free; in vmem_altmap_offset()
3977 altmap->alloc -= nr_pfns; in vmem_altmap_free()
[all …]
/linux-6.15/arch/arm64/mm/
H A Dmmu.c820 struct vmem_altmap *altmap) in free_hotplug_page_range() argument
822 if (altmap) { in free_hotplug_page_range()
856 struct vmem_altmap *altmap) in unmap_hotplug_pte_range() argument
871 PAGE_SIZE, altmap); in unmap_hotplug_pte_range()
877 struct vmem_altmap *altmap) in unmap_hotplug_pmd_range() argument
900 PMD_SIZE, altmap); in unmap_hotplug_pmd_range()
910 struct vmem_altmap *altmap) in unmap_hotplug_pud_range() argument
933 PUD_SIZE, altmap); in unmap_hotplug_pud_range()
972 WARN_ON(!free_mapped && altmap); in unmap_hotplug_range()
1177 struct vmem_altmap *altmap) in vmemmap_populate() argument
[all …]
/linux-6.15/arch/x86/mm/
H A Dinit_64.c1019 struct vmem_altmap *altmap) in free_hugepage_table() argument
1021 if (altmap) in free_hugepage_table()
1126 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument
1144 altmap); in remove_pmd_table()
1154 altmap); in remove_pmd_table()
1175 struct vmem_altmap *altmap, bool direct) in remove_pud_table() argument
1209 struct vmem_altmap *altmap, bool direct) in remove_p4d_table() argument
1242 struct vmem_altmap *altmap) in remove_pagetable() argument
1264 struct vmem_altmap *altmap) in vmemmap_free() argument
1547 struct vmem_altmap *altmap) in vmemmap_populate() argument
[all …]
/linux-6.15/drivers/base/
H A Dmemory.c109 WARN_ON(mem->altmap); in memory_block_release()
208 if (mem->altmap) in memory_block_online()
209 nr_vmemmap_pages = mem->altmap->free; in memory_block_online()
223 zone, mem->altmap->inaccessible); in memory_block_online()
272 if (mem->altmap) in memory_block_offline()
273 nr_vmemmap_pages = mem->altmap->free; in memory_block_offline()
775 struct vmem_altmap *altmap, in add_memory_block() argument
793 mem->altmap = altmap; in add_memory_block()
820 struct vmem_altmap *altmap, in add_hotplug_memory_block() argument
851 struct vmem_altmap *altmap, in create_memory_block_devices() argument
[all …]
/linux-6.15/arch/riscv/mm/
H A Dinit.c1450 struct vmem_altmap *altmap) in vmemmap_populate() argument
1626 struct vmem_altmap *altmap) in free_vmemmap_storage() argument
1630 if (altmap) { in free_vmemmap_storage()
1631 vmem_altmap_free(altmap, size >> PAGE_SHIFT); in free_vmemmap_storage()
1647 bool is_vmemmap, struct vmem_altmap *altmap) in remove_pte_mapping() argument
1664 free_vmemmap_storage(pte_page(pte), PAGE_SIZE, altmap); in remove_pte_mapping()
1669 bool is_vmemmap, struct vmem_altmap *altmap) in remove_pmd_mapping() argument
1696 bool is_vmemmap, struct vmem_altmap *altmap) in remove_pud_mapping() argument
1727 bool is_vmemmap, struct vmem_altmap *altmap) in remove_p4d_mapping() argument
1758 struct vmem_altmap *altmap) in remove_pgd_mapping() argument
[all …]
/linux-6.15/arch/powerpc/include/asm/book3s/64/
H A Dradix.h334 int node, struct vmem_altmap *altmap);
336 struct vmem_altmap *altmap);
367 bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
/linux-6.15/drivers/nvdimm/
H A Dpfn_devs.c686 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn() local
718 memcpy(altmap, &__altmap, sizeof(*altmap)); in __nvdimm_setup_pfn()
719 altmap->free = PHYS_PFN(offset - reserve); in __nvdimm_setup_pfn()
720 altmap->alloc = 0; in __nvdimm_setup_pfn()
/linux-6.15/arch/powerpc/include/asm/
H A Dpgtable.h193 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start,
/linux-6.15/Documentation/ABI/testing/
H A Dsysfs-bus-dax145 the 'altmap' for the hotplugged memory will be placed on the
/linux-6.15/Documentation/mm/
H A Dvmemmap_dedup.rst190 the device (altmap).
/linux-6.15/arch/sparc/mm/
H A Dinit_64.c2585 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument