Lines Matching refs:start
94 static void vmemmap_mark_sub_pmd_used(unsigned long start, unsigned long end) in vmemmap_mark_sub_pmd_used() argument
102 memset((void *)start, 0, sizeof(struct page)); in vmemmap_mark_sub_pmd_used()
105 static void vmemmap_use_sub_pmd(unsigned long start, unsigned long end) in vmemmap_use_sub_pmd() argument
111 if (unused_sub_pmd_start == start) { in vmemmap_use_sub_pmd()
118 vmemmap_mark_sub_pmd_used(start, end); in vmemmap_use_sub_pmd()
121 static void vmemmap_use_new_sub_pmd(unsigned long start, unsigned long end) in vmemmap_use_new_sub_pmd() argument
123 unsigned long page = ALIGN_DOWN(start, PMD_SIZE); in vmemmap_use_new_sub_pmd()
128 vmemmap_mark_sub_pmd_used(start, end); in vmemmap_use_new_sub_pmd()
131 if (!IS_ALIGNED(start, PMD_SIZE)) in vmemmap_use_new_sub_pmd()
132 memset((void *)page, PAGE_UNUSED, start - page); in vmemmap_use_new_sub_pmd()
143 static bool vmemmap_unuse_sub_pmd(unsigned long start, unsigned long end) in vmemmap_unuse_sub_pmd() argument
145 unsigned long page = ALIGN_DOWN(start, PMD_SIZE); in vmemmap_unuse_sub_pmd()
148 memset((void *)start, PAGE_UNUSED, end - start); in vmemmap_unuse_sub_pmd()
194 static void try_free_pte_table(pmd_t *pmd, unsigned long start) in try_free_pte_table() argument
200 pte = pte_offset_kernel(pmd, start); in try_free_pte_table()
291 static void try_free_pmd_table(pud_t *pud, unsigned long start) in try_free_pmd_table() argument
293 const unsigned long end = start + PUD_SIZE; in try_free_pmd_table()
301 if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end) in try_free_pmd_table()
304 pmd = pmd_offset(pud, start); in try_free_pmd_table()
366 static void try_free_pud_table(p4d_t *p4d, unsigned long start) in try_free_pud_table() argument
368 const unsigned long end = start + P4D_SIZE; in try_free_pud_table()
376 if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end) in try_free_pud_table()
380 pud = pud_offset(p4d, start); in try_free_pud_table()
420 static void try_free_p4d_table(pgd_t *pgd, unsigned long start) in try_free_p4d_table() argument
422 const unsigned long end = start + PGDIR_SIZE; in try_free_p4d_table()
430 if (start < KASAN_SHADOW_END && KASAN_SHADOW_START > end) in try_free_p4d_table()
434 p4d = p4d_offset(pgd, start); in try_free_p4d_table()
443 static int modify_pagetable(unsigned long start, unsigned long end, bool add, in modify_pagetable() argument
451 if (WARN_ON_ONCE(!PAGE_ALIGNED(start | end))) in modify_pagetable()
453 for (addr = start; addr < end; addr = next) { in modify_pagetable()
475 flush_tlb_kernel_range(start, end); in modify_pagetable()
479 static int add_pagetable(unsigned long start, unsigned long end, bool direct) in add_pagetable() argument
481 return modify_pagetable(start, end, true, direct); in add_pagetable()
484 static int remove_pagetable(unsigned long start, unsigned long end, bool direct) in remove_pagetable() argument
486 return modify_pagetable(start, end, false, direct); in remove_pagetable()
492 static int vmem_add_range(unsigned long start, unsigned long size) in vmem_add_range() argument
494 return add_pagetable(start, start + size, true); in vmem_add_range()
500 static void vmem_remove_range(unsigned long start, unsigned long size) in vmem_remove_range() argument
502 remove_pagetable(start, start + size, true); in vmem_remove_range()
508 int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, in vmemmap_populate() argument
515 ret = add_pagetable(start, end, false); in vmemmap_populate()
517 remove_pagetable(start, end, false); in vmemmap_populate()
522 void vmemmap_free(unsigned long start, unsigned long end, in vmemmap_free() argument
526 remove_pagetable(start, end, false); in vmemmap_free()
530 void vmem_remove_mapping(unsigned long start, unsigned long size) in vmem_remove_mapping() argument
533 vmem_remove_range(start, size); in vmem_remove_mapping()
541 mhp_range.start = 0; in arch_get_mappable_range()
546 int vmem_add_mapping(unsigned long start, unsigned long size) in vmem_add_mapping() argument
551 if (start < range.start || in vmem_add_mapping()
552 start + size > range.end + 1 || in vmem_add_mapping()
553 start + size < start) in vmem_add_mapping()
557 ret = vmem_add_range(start, size); in vmem_add_mapping()
559 vmem_remove_range(start, size); in vmem_add_mapping()