Home
last modified time | relevance | path

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

/Linux-v4.19/mm/
Dsparse-vmemmap.c83 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 …]
Dsparse.c386 struct vmem_altmap *altmap) in sparse_mem_map_populate() argument
566 struct vmem_altmap *altmap) in kmalloc_section_memmap() argument
569 return sparse_mem_map_populate(pnum, nid, altmap); in kmalloc_section_memmap()
572 struct vmem_altmap *altmap) in __kfree_section_memmap() argument
577 vmemmap_free(start, end, altmap); in __kfree_section_memmap()
611 struct vmem_altmap *altmap) in kmalloc_section_memmap() argument
617 struct vmem_altmap *altmap) in __kfree_section_memmap() argument
665 unsigned long start_pfn, struct vmem_altmap *altmap) in sparse_add_one_section() argument
682 memmap = kmalloc_section_memmap(section_nr, pgdat->node_id, altmap); in sparse_add_one_section()
687 __kfree_section_memmap(memmap, altmap); in sparse_add_one_section()
[all …]
Dmemory_hotplug.c250 struct vmem_altmap *altmap, bool want_memblock) in __add_section() argument
257 ret = sparse_add_one_section(NODE_DATA(nid), phys_start_pfn, altmap); in __add_section()
274 unsigned long nr_pages, struct vmem_altmap *altmap, in __add_pages() argument
285 if (altmap) { in __add_pages()
289 if (altmap->base_pfn != phys_start_pfn in __add_pages()
290 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages()
295 altmap->alloc = 0; in __add_pages()
299 err = __add_section(nid, section_nr_to_pfn(i), altmap, in __add_pages()
518 unsigned long map_offset, struct vmem_altmap *altmap) in __remove_section() argument
535 sparse_remove_one_section(zone, ms, map_offset, altmap); in __remove_section()
[all …]
Dpage_alloc.c5459 struct vmem_altmap *altmap) in memmap_init_zone() argument
5477 if (altmap && start_pfn == altmap->base_pfn) in memmap_init_zone()
5478 start_pfn += altmap->reserve; in memmap_init_zone()
/Linux-v4.19/kernel/
Dmemremap.c91 struct vmem_altmap *altmap = &pgmap->altmap; in pfn_first() local
96 pfn += vmem_altmap_offset(altmap); in pfn_first()
140 &pgmap->altmap : NULL); in devm_memremap_pages_release()
146 dev_WARN_ONCE(dev, pgmap->altmap.alloc, in devm_memremap_pages_release()
175 struct vmem_altmap *altmap = pgmap->altmap_valid ? in devm_memremap_pages() local
176 &pgmap->altmap : NULL; in devm_memremap_pages()
250 error = arch_add_memory(nid, align_start, align_size, altmap, false); in devm_memremap_pages()
254 align_size >> PAGE_SHIFT, altmap); in devm_memremap_pages()
288 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument
291 return altmap->reserve + altmap->free; in vmem_altmap_offset()
[all …]
/Linux-v4.19/include/linux/
Dmemremap.h116 struct vmem_altmap altmap; member
130 unsigned long vmem_altmap_offset(struct vmem_altmap *altmap);
131 void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns);
151 static inline unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) in vmem_altmap_offset() argument
156 static inline void vmem_altmap_free(struct vmem_altmap *altmap, in vmem_altmap_free() argument
Dmemory_hotplug.h111 struct vmem_altmap *altmap);
113 unsigned long nr_pages, struct vmem_altmap *altmap);
118 struct vmem_altmap *altmap, bool want_memblock);
122 unsigned long nr_pages, struct vmem_altmap *altmap, in add_pages() argument
125 return __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); in add_pages()
129 struct vmem_altmap *altmap, bool want_memblock);
328 struct vmem_altmap *altmap, bool want_memblock);
330 unsigned long nr_pages, struct vmem_altmap *altmap);
335 unsigned long start_pfn, struct vmem_altmap *altmap);
337 unsigned long map_offset, struct vmem_altmap *altmap);
Dmm.h2668 struct vmem_altmap *altmap);
2677 void *altmap_alloc_block_buf(unsigned long size, struct vmem_altmap *altmap);
2682 struct vmem_altmap *altmap);
2686 struct vmem_altmap *altmap);
/Linux-v4.19/arch/x86/mm/
Dinit_64.c787 struct vmem_altmap *altmap, bool want_memblock) in add_pages() argument
791 ret = __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); in add_pages()
801 int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, in arch_add_memory() argument
809 return add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); in arch_add_memory()
835 struct vmem_altmap *altmap) in free_hugepage_table() argument
837 if (altmap) in free_hugepage_table()
838 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); in free_hugepage_table()
970 bool direct, struct vmem_altmap *altmap) in remove_pmd_table() argument
989 altmap); in remove_pmd_table()
1003 altmap); in remove_pmd_table()
[all …]
Dinit_32.c854 int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, in arch_add_memory() argument
860 return __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); in arch_add_memory()
864 int arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
871 return __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
/Linux-v4.19/arch/powerpc/mm/
Dinit_64.c181 struct vmem_altmap *altmap) in vmemmap_populate() argument
197 if (altmap) in vmemmap_populate()
198 p = altmap_alloc_block_buf(page_size, altmap); in vmemmap_populate()
254 struct vmem_altmap *altmap) in vmemmap_free() argument
284 if (altmap) { in vmemmap_free()
285 vmem_altmap_free(altmap, nr_pages); in vmemmap_free()
Dmem.c121 int __meminit arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, in arch_add_memory() argument
139 return __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); in arch_add_memory()
143 int __meminit arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
155 if (altmap) in arch_remove_memory()
156 page += vmem_altmap_offset(altmap); in arch_remove_memory()
158 ret = __remove_pages(page_zone(page), start_pfn, nr_pages, altmap); in arch_remove_memory()
/Linux-v4.19/arch/s390/mm/
Dinit.c225 int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, in arch_add_memory() argument
236 rc = __add_pages(nid, start_pfn, size_pages, altmap, want_memblock); in arch_add_memory()
243 int arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
Dvmem.c215 struct vmem_altmap *altmap) in vmemmap_populate() argument
301 struct vmem_altmap *altmap) in vmemmap_free() argument
/Linux-v4.19/arch/sh/mm/
Dinit.c422 int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, in arch_add_memory() argument
430 ret = __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); in arch_add_memory()
447 int arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
455 ret = __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
/Linux-v4.19/drivers/nvdimm/
Dpfn_devs.c547 struct vmem_altmap *altmap = &pgmap->altmap; in __nvdimm_setup_pfn() local
577 memcpy(altmap, &__altmap, sizeof(*altmap)); in __nvdimm_setup_pfn()
578 altmap->free = PHYS_PFN(offset - SZ_8K); in __nvdimm_setup_pfn()
579 altmap->alloc = 0; in __nvdimm_setup_pfn()
/Linux-v4.19/arch/ia64/mm/
Dinit.c649 int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, in arch_add_memory() argument
656 ret = __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); in arch_add_memory()
665 int arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) in arch_remove_memory() argument
673 ret = __remove_pages(zone, start_pfn, nr_pages, altmap); in arch_remove_memory()
Ddiscontig.c656 struct vmem_altmap *altmap) in vmemmap_populate() argument
662 struct vmem_altmap *altmap) in vmemmap_free() argument
/Linux-v4.19/arch/arm64/mm/
Dmmu.c705 struct vmem_altmap *altmap) in vmemmap_populate() argument
711 struct vmem_altmap *altmap) in vmemmap_populate() argument
747 struct vmem_altmap *altmap) in vmemmap_free() argument
/Linux-v4.19/arch/sparc/mm/
Dinit_64.c2631 int node, struct vmem_altmap *altmap) in vmemmap_populate() argument
2675 struct vmem_altmap *altmap) in vmemmap_free() argument