Lines Matching refs:length

27 static void mm_calculate_entry_num(uint64_t length, mm_pgt_entry_num_t *ent)  in mm_calculate_entry_num()  argument
31 ent->num_PML4E = (length + (1UL << PAGE_GDT_SHIFT) - 1) >> PAGE_GDT_SHIFT; in mm_calculate_entry_num()
32 ent->num_PDPTE = (length + PAGE_1G_SIZE - 1) >> PAGE_1G_SHIFT; in mm_calculate_entry_num()
33 ent->num_PDE = (length + PAGE_2M_SIZE - 1) >> PAGE_2M_SHIFT; in mm_calculate_entry_num()
34 ent->num_PTE = (length + PAGE_4K_SIZE - 1) >> PAGE_4K_SHIFT; in mm_calculate_entry_num()
46 int mm_map_phys_addr(ul virt_addr_start, ul phys_addr_start, ul length, ul flags, bool use4k) in mm_map_phys_addr() argument
50 …return mm_map_proc_page_table(global_CR3, true, virt_addr_start, phys_addr_start, length, flags, f… in mm_map_phys_addr()
53 int mm_map_phys_addr_user(ul virt_addr_start, ul phys_addr_start, ul length, ul flags) in mm_map_phys_addr_user() argument
56 …return mm_map_proc_page_table(global_CR3, true, virt_addr_start, phys_addr_start, length, flags, t… in mm_map_phys_addr_user()
71 …age_table_addr, bool is_phys, ul virt_addr_start, ul phys_addr_start, ul length, ul flags, bool us… in mm_map_proc_page_table() argument
76 mm_calculate_entry_num(length, &pgt_num); in mm_map_proc_page_table()
203 void mm_unmap_proc_table(ul proc_page_table_addr, bool is_phys, ul virt_addr_start, ul length) in mm_unmap_proc_table() argument
208 mm_calculate_entry_num(length, &pgt_num); in mm_unmap_proc_table()
320 int mm_create_vma(struct mm_struct *mm, uint64_t vaddr, uint64_t length, vm_flags_t vm_flags, struc… in mm_create_vma() argument
333 vma->vm_end = vaddr + length; in mm_create_vma()
360 int mm_map_vma(struct vm_area_struct *vma, uint64_t paddr, uint64_t offset, uint64_t length) in mm_map_vma() argument
365 length = PAGE_4K_ALIGN(length); // 将length按照4K进行对齐 in mm_map_vma()
392 BUG_ON(vma->vm_start + offset + length > vma->vm_end); in mm_map_vma()
403 len_4k = (len_4k > length) ? length : len_4k; in mm_map_vma()
417 length -= len_4k; in mm_map_vma()
420 len_4k = length % PAGE_2M_SIZE; in mm_map_vma()
421 len_2m = length / PAGE_2M_SIZE; in mm_map_vma()
473 int mm_map(struct mm_struct *mm, uint64_t vaddr, uint64_t length, uint64_t paddr) in mm_map() argument
477 for (uint64_t mapped = 0; mapped < length;) in mm_map()
550 int mm_unmap(struct mm_struct *mm, uint64_t vaddr, uint64_t length, bool destroy) in mm_unmap() argument
553 for (uint64_t unmapped = 0; unmapped < length;) in mm_unmap()