/linux-master/mm/ |
H A D | sparse-vmemmap.c | 74 struct vmem_altmap *altmap); 78 struct vmem_altmap *altmap) 82 if (altmap) 83 return altmap_alloc_block_buf(size, altmap); 91 static unsigned long __meminit vmem_altmap_next_pfn(struct vmem_altmap *altmap) argument 93 return altmap->base_pfn + altmap->reserve + altmap->alloc 94 + altmap->align; 97 static unsigned long __meminit vmem_altmap_nr_free(struct vmem_altmap *altmap) argument 77 vmemmap_alloc_block_buf(unsigned long size, int node, struct vmem_altmap *altmap) argument 106 altmap_alloc_block_buf(unsigned long size, struct vmem_altmap *altmap) argument 144 vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node, struct vmem_altmap *altmap, struct page *reuse) argument 245 vmemmap_populate_address(unsigned long addr, int node, struct vmem_altmap *altmap, struct page *reuse) argument 275 vmemmap_populate_range(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap, struct page *reuse) argument 292 vmemmap_populate_basepages(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument 309 vmemmap_populate_hugepages(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument 452 __populate_section_memmap(unsigned long pfn, unsigned long nr_pages, int nid, struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument [all...] |
H A D | sparse.c | 429 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 632 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 635 return __populate_section_memmap(pfn, nr_pages, nid, altmap, pgmap); 639 struct vmem_altmap *altmap) 644 vmemmap_free(start, end, altmap); 704 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 712 struct vmem_altmap *altmap) 780 struct vmem_altmap *altmap) 820 depopulate_section_memmap(pfn, nr_pages, altmap); 829 unsigned long nr_pages, struct vmem_altmap *altmap, 428 __populate_section_memmap(unsigned long pfn, unsigned long nr_pages, int nid, struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument 631 populate_section_memmap(unsigned long pfn, unsigned long nr_pages, int nid, struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument 638 depopulate_section_memmap(unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap) argument 703 populate_section_memmap(unsigned long pfn, unsigned long nr_pages, int nid, struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument 711 depopulate_section_memmap(unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap) argument 779 section_deactivate(unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap) argument 828 section_activate(int nid, unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument 890 sparse_add_section(int nid, unsigned long start_pfn, unsigned long nr_pages, struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument 926 sparse_remove_section(unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap) argument [all...] |
H A D | memory_hotplug.c | 375 struct vmem_altmap *altmap = params->altmap; local 382 if (altmap) { 384 * Validate altmap is within bounds of the total request 386 if (altmap->base_pfn != pfn 387 || vmem_altmap_offset(altmap) > nr_pages) { 388 pr_warn_once("memory add fail, invalid altmap\n"); 391 altmap->alloc = 0; 403 err = sparse_add_section(nid, pfn, cur_nr_pages, altmap, 566 * @altmap 573 __remove_pages(unsigned long pfn, unsigned long nr_pages, struct vmem_altmap *altmap) argument 750 move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, unsigned long nr_pages, struct vmem_altmap *altmap, int migratetype) argument 1401 struct vmem_altmap *altmap = NULL; local [all...] |
H A D | mm_init.c | 852 struct vmem_altmap *altmap, int migratetype) 869 if (!altmap) 872 if (start_pfn == altmap->base_pfn) 873 start_pfn += altmap->reserve; 874 end_pfn = altmap->base_pfn + vmem_altmap_offset(altmap); 1026 * of an altmap. See vmemmap_populate_compound_pages(). 1028 static inline unsigned long compound_nr_pages(struct vmem_altmap *altmap, argument 1031 if (!vmemmap_can_optimize(altmap, pgmap)) 1071 struct vmem_altmap *altmap local 849 memmap_init_range(unsigned long size, int nid, unsigned long zone, unsigned long start_pfn, unsigned long zone_end_pfn, enum meminit_context context, struct vmem_altmap *altmap, int migratetype) argument [all...] |
H A D | memremap.c | 153 WARN_ONCE(pgmap->altmap.alloc, "failed to free all reserved pages\n"); 179 "altmap not supported for multiple ranges\n")) 256 PHYS_PFN(range_len(range)), params->altmap, 295 .altmap = pgmap_altmap(pgmap), 392 * 2/ The altmap field may optionally be initialized, in which case
|
/linux-master/arch/powerpc/mm/ |
H A D | init_64.c | 187 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, argument 193 if ((start_pfn + nr_pfn - 1) > altmap->end_pfn) 196 if (start_pfn < altmap->base_pfn) 203 struct vmem_altmap *altmap) 227 * Allocate from the altmap first if we have one. This may 229 * fall back to system memory if the altmap allocation fail. 231 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) { 232 p = vmemmap_alloc_block_buf(page_size, node, altmap); 234 pr_debug("altmap bloc 202 __vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument 276 vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument 319 __vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument 378 vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument [all...] |
H A D | mem.c | 158 void __ref arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) argument 163 __remove_pages(start_pfn, nr_pages, altmap);
|
/linux-master/arch/s390/mm/ |
H A D | vmem.c | 36 static void vmem_free_pages(unsigned long addr, int order, struct vmem_altmap *altmap) argument 38 if (altmap) { 39 vmem_altmap_free(altmap, 1 << order); 164 struct vmem_altmap *altmap) 180 vmem_free_pages((unsigned long)pfn_to_virt(pte_pfn(*pte)), get_order(PAGE_SIZE), altmap); 184 void *new_page = vmemmap_alloc_block_buf(PAGE_SIZE, NUMA_NO_NODE, altmap); 222 struct vmem_altmap *altmap) 243 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); 247 vmem_free_pages(pmd_deref(*pmd), get_order(PMD_SIZE), altmap); 270 new_page = vmemmap_alloc_block_buf(PMD_SIZE, NUMA_NO_NODE, altmap); 162 modify_pte_table(pmd_t *pmd, unsigned long addr, unsigned long end, bool add, bool direct, struct vmem_altmap *altmap) argument 220 modify_pmd_table(pud_t *pud, unsigned long addr, unsigned long end, bool add, bool direct, struct vmem_altmap *altmap) argument 315 modify_pud_table(p4d_t *p4d, unsigned long addr, unsigned long end, bool add, bool direct, struct vmem_altmap *altmap) argument 383 modify_p4d_table(pgd_t *pgd, unsigned long addr, unsigned long end, bool add, bool direct, struct vmem_altmap *altmap) argument 428 modify_pagetable(unsigned long start, unsigned long end, bool add, bool direct, struct vmem_altmap *altmap) argument 467 add_pagetable(unsigned long start, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 473 remove_pagetable(unsigned long start, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 500 vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument 516 vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument [all...] |
H A D | init.c | 296 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) argument 301 __remove_pages(start_pfn, nr_pages, altmap);
|
/linux-master/arch/powerpc/mm/book3s64/ |
H A D | radix_pgtable.c | 691 struct vmem_altmap *altmap, 696 if (altmap) { 703 * used altmap. 705 alt_start = altmap->base_pfn; 706 alt_end = altmap->base_pfn + altmap->reserve + altmap->free; 709 vmem_altmap_free(altmap, nr_pages); 724 struct vmem_altmap *altmap) 740 free_vmemmap_pages(pte_page(*pte), altmap, 690 free_vmemmap_pages(struct page *page, struct vmem_altmap *altmap, int order) argument 722 remove_pte_table(pte_t *pte_start, unsigned long addr, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 755 remove_pmd_table(pmd_t *pmd_start, unsigned long addr, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 795 remove_pud_table(pud_t *pud_start, unsigned long addr, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 830 remove_pagetable(unsigned long start, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 916 vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument 949 radix__vmemmap_pte_populate(pmd_t *pmdp, unsigned long addr, int node, struct vmem_altmap *altmap, struct page *reuse) argument 1048 radix__vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument 1134 radix__vmemmap_populate_address(unsigned long addr, int node, struct vmem_altmap *altmap, struct page *reuse) argument 1334 radix__vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument [all...] |
/linux-master/include/linux/ |
H A D | memory.h | 80 struct vmem_altmap *altmap; member in struct:memory_block 105 * specifying the altmap range and are exclusively intended for use in 156 struct vmem_altmap *altmap,
|
H A D | memory_hotplug.h | 115 * because the altmap cannot be written (e.g., poisoned) when adding 118 * This allows for adding memory with an altmap that is not currently 128 * altmap: alternative allocator for memmap array (optional) 133 struct vmem_altmap *altmap; member in struct:mhp_params 204 extern void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap); 206 struct vmem_altmap *altmap); 364 struct vmem_altmap *altmap, int migratetype); 369 unsigned long nr_pages, struct vmem_altmap *altmap, 372 struct vmem_altmap *altmap);
|
H A D | memremap.h | 109 * @altmap: pre-allocated/reserved memory for vmemmap allocations 128 struct vmem_altmap altmap; member in struct:dev_pagemap 151 return &pgmap->altmap;
|
H A D | mm.h | 3865 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, 3874 struct vmem_altmap *altmap, struct page *reuse); 3878 struct vmem_altmap *altmap); 3885 int node, struct vmem_altmap *altmap); 3887 int node, struct vmem_altmap *altmap); 3889 struct vmem_altmap *altmap); 3893 struct vmem_altmap *altmap); 3897 static inline unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) argument 3900 if (altmap) 3901 return altmap 3905 vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns) argument 3911 vmem_altmap_offset(struct vmem_altmap *altmap) argument 3916 vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns) argument 3924 __vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument 3949 vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap) argument [all...] |
/linux-master/arch/loongarch/mm/ |
H A D | init.c | 108 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) argument 114 /* With altmap the first mapped page is offset from @start */ 115 if (altmap) 116 page += vmem_altmap_offset(altmap); 117 __remove_pages(start_pfn, nr_pages, altmap); 152 int node, struct vmem_altmap *altmap) 162 void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument 151 vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument
|
/linux-master/arch/arm64/mm/ |
H A D | mmu.c | 805 struct vmem_altmap *altmap) 807 if (altmap) { 808 vmem_altmap_free(altmap, size >> PAGE_SHIFT); 841 struct vmem_altmap *altmap) 856 PAGE_SIZE, altmap); local 862 struct vmem_altmap *altmap) 885 PMD_SIZE, altmap); local 889 unmap_hotplug_pte_range(pmdp, addr, next, free_mapped, altmap); 895 struct vmem_altmap *altmap) 918 PUD_SIZE, altmap); local 804 free_hotplug_page_range(struct page *page, size_t size, struct vmem_altmap *altmap) argument 839 unmap_hotplug_pte_range(pmd_t *pmdp, unsigned long addr, unsigned long end, bool free_mapped, struct vmem_altmap *altmap) argument 860 unmap_hotplug_pmd_range(pud_t *pudp, unsigned long addr, unsigned long end, bool free_mapped, struct vmem_altmap *altmap) argument 893 unmap_hotplug_pud_range(p4d_t *p4dp, unsigned long addr, unsigned long end, bool free_mapped, struct vmem_altmap *altmap) argument 926 unmap_hotplug_p4d_range(pgd_t *pgdp, unsigned long addr, unsigned long end, bool free_mapped, struct vmem_altmap *altmap) argument 945 unmap_hotplug_range(unsigned long addr, unsigned long end, bool free_mapped, struct vmem_altmap *altmap) argument 1160 vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument 1172 vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument 1352 arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) argument [all...] |
/linux-master/arch/x86/mm/ |
H A D | init_64.c | 997 struct vmem_altmap *altmap) 999 if (altmap) 1000 vmem_altmap_free(altmap, PMD_SIZE / PAGE_SIZE); 1104 bool direct, struct vmem_altmap *altmap) 1122 altmap); 1132 altmap); 1153 struct vmem_altmap *altmap, bool direct) 1177 remove_pmd_table(pmd_base, addr, next, direct, altmap); 1187 struct vmem_altmap *altmap, bool direct) 1203 remove_pud_table(pud_base, addr, next, altmap, direc 996 free_hugepage_table(struct page *page, struct vmem_altmap *altmap) argument 1103 remove_pmd_table(pmd_t *pmd_start, unsigned long addr, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 1152 remove_pud_table(pud_t *pud_start, unsigned long addr, unsigned long end, struct vmem_altmap *altmap, bool direct) argument 1186 remove_p4d_table(p4d_t *p4d_start, unsigned long addr, unsigned long end, struct vmem_altmap *altmap, bool direct) argument 1219 remove_pagetable(unsigned long start, unsigned long end, bool direct, struct vmem_altmap *altmap) argument 1241 vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument 1259 arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) argument 1533 vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument [all...] |
/linux-master/drivers/base/ |
H A D | memory.c | 108 /* Verify that the altmap is freed */ 109 WARN_ON(mem->altmap); 208 if (mem->altmap) 209 nr_vmemmap_pages = mem->altmap->free; 223 zone, mem->altmap->inaccessible); 272 if (mem->altmap) 273 nr_vmemmap_pages = mem->altmap->free; 779 struct vmem_altmap *altmap, 797 mem->altmap = altmap; 778 add_memory_block(unsigned long block_id, unsigned long state, struct vmem_altmap *altmap, struct memory_group *group) argument 839 add_hotplug_memory_block(unsigned long block_id, struct vmem_altmap *altmap, struct memory_group *group) argument 870 create_memory_block_devices(unsigned long start, unsigned long size, struct vmem_altmap *altmap, struct memory_group *group) argument [all...] |
/linux-master/arch/powerpc/include/asm/book3s/64/ |
H A D | radix.h | 334 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-master/arch/powerpc/include/asm/ |
H A D | pgtable.h | 189 bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, 195 * alignment requirement is met using altmap->reserve blocks.
|
/linux-master/arch/sh/mm/ |
H A D | init.c | 418 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap) argument 423 __remove_pages(start_pfn, nr_pages, altmap);
|
/linux-master/drivers/nvdimm/ |
H A D | pfn_devs.c | 685 struct vmem_altmap *altmap = &pgmap->altmap; local 717 memcpy(altmap, &__altmap, sizeof(*altmap)); 718 altmap->free = PHYS_PFN(offset - reserve); 719 altmap->alloc = 0; 789 * The altmap should be padded out to the block size used
|
/linux-master/arch/sparc/mm/ |
H A D | init_64.c | 2596 int node, struct vmem_altmap *altmap) 2645 struct vmem_altmap *altmap) 2595 vmemmap_populate(unsigned long vstart, unsigned long vend, int node, struct vmem_altmap *altmap) argument 2644 vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) argument
|
/linux-master/arch/riscv/mm/ |
H A D | init.c | 1415 struct vmem_altmap *altmap) 1414 vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) argument
|