Lines Matching full:start

92 static void __vmemmap_use_sub_pmd(unsigned long start, unsigned long end)  in __vmemmap_use_sub_pmd()  argument
100 memset(__va(start), 0, sizeof(struct page)); in __vmemmap_use_sub_pmd()
103 static void vmemmap_use_sub_pmd(unsigned long start, unsigned long end) in vmemmap_use_sub_pmd() argument
109 if (unused_pmd_start == start) { in vmemmap_use_sub_pmd()
116 __vmemmap_use_sub_pmd(start, end); in vmemmap_use_sub_pmd()
119 static void vmemmap_use_new_sub_pmd(unsigned long start, unsigned long end) in vmemmap_use_new_sub_pmd() argument
121 void *page = __va(ALIGN_DOWN(start, PMD_SIZE)); in vmemmap_use_new_sub_pmd()
126 __vmemmap_use_sub_pmd(start, end); in vmemmap_use_new_sub_pmd()
129 if (!IS_ALIGNED(start, PMD_SIZE)) in vmemmap_use_new_sub_pmd()
130 memset(page, PAGE_UNUSED, start - __pa(page)); in vmemmap_use_new_sub_pmd()
141 static bool vmemmap_unuse_sub_pmd(unsigned long start, unsigned long end) in vmemmap_unuse_sub_pmd() argument
143 void *page = __va(ALIGN_DOWN(start, PMD_SIZE)); in vmemmap_unuse_sub_pmd()
146 memset(__va(start), PAGE_UNUSED, end - start); in vmemmap_unuse_sub_pmd()
192 static void try_free_pte_table(pmd_t *pmd, unsigned long start) in try_free_pte_table() argument
198 pte = pte_offset_kernel(pmd, start); in try_free_pte_table()
289 static void try_free_pmd_table(pud_t *pud, unsigned long start) in try_free_pmd_table() argument
291 const unsigned long end = start + PUD_SIZE; in try_free_pmd_table()
299 if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end) in try_free_pmd_table()
302 pmd = pmd_offset(pud, start); in try_free_pmd_table()
364 static void try_free_pud_table(p4d_t *p4d, unsigned long start) in try_free_pud_table() argument
366 const unsigned long end = start + P4D_SIZE; in try_free_pud_table()
374 if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end) in try_free_pud_table()
378 pud = pud_offset(p4d, start); in try_free_pud_table()
418 static void try_free_p4d_table(pgd_t *pgd, unsigned long start) in try_free_p4d_table() argument
420 const unsigned long end = start + PGDIR_SIZE; in try_free_p4d_table()
428 if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end) in try_free_p4d_table()
432 p4d = p4d_offset(pgd, start); in try_free_p4d_table()
441 static int modify_pagetable(unsigned long start, unsigned long end, bool add, in modify_pagetable() argument
449 if (WARN_ON_ONCE(!PAGE_ALIGNED(start | end))) in modify_pagetable()
451 for (addr = start; addr < end; addr = next) { in modify_pagetable()
473 flush_tlb_kernel_range(start, end); in modify_pagetable()
477 static int add_pagetable(unsigned long start, unsigned long end, bool direct) in add_pagetable() argument
479 return modify_pagetable(start, end, true, direct); in add_pagetable()
482 static int remove_pagetable(unsigned long start, unsigned long end, bool direct) in remove_pagetable() argument
484 return modify_pagetable(start, end, false, direct); in remove_pagetable()
490 static int vmem_add_range(unsigned long start, unsigned long size) in vmem_add_range() argument
492 return add_pagetable(start, start + size, true); in vmem_add_range()
498 static void vmem_remove_range(unsigned long start, unsigned long size) in vmem_remove_range() argument
500 remove_pagetable(start, start + size, true); in vmem_remove_range()
506 int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, in vmemmap_populate() argument
513 ret = add_pagetable(start, end, false); in vmemmap_populate()
515 remove_pagetable(start, end, false); in vmemmap_populate()
520 void vmemmap_free(unsigned long start, unsigned long end, in vmemmap_free() argument
524 remove_pagetable(start, end, false); in vmemmap_free()
528 void vmem_remove_mapping(unsigned long start, unsigned long size) in vmem_remove_mapping() argument
531 vmem_remove_range(start, size); in vmem_remove_mapping()
535 int vmem_add_mapping(unsigned long start, unsigned long size) in vmem_add_mapping() argument
539 if (start + size > VMEM_MAX_PHYS || in vmem_add_mapping()
540 start + size < start) in vmem_add_mapping()
544 ret = vmem_add_range(start, size); in vmem_add_mapping()
546 vmem_remove_range(start, size); in vmem_add_mapping()