Lines Matching full:last

77 static void shm_region_add(abi_ptr start, abi_ptr last)  in shm_region_add()  argument
82 i->last = last; in shm_region_add()
93 return i->last; in shm_region_find()
99 static void shm_region_rm_complete(abi_ptr start, abi_ptr last) in shm_region_rm_complete() argument
103 for (i = interval_tree_iter_first(&shm_regions, start, last); i; i = n) { in shm_region_rm_complete()
104 n = interval_tree_iter_next(i, start, last); in shm_region_rm_complete()
105 if (i->start >= start && i->last <= last) { in shm_region_rm_complete()
173 abi_ulong host_start, host_last, last; in target_mprotect() local
193 last = start + len - 1; in target_mprotect()
195 host_last = ROUND_UP(last, host_page_size) - 1; in target_mprotect()
206 for (abi_ulong a = last; a < host_last; a += TARGET_PAGE_SIZE) { in target_mprotect()
230 if (last < host_last) { in target_mprotect()
233 for (abi_ulong a = last; a < host_last; a += TARGET_PAGE_SIZE) { in target_mprotect()
263 page_set_flags(start, last, page_flags); in target_mprotect()
330 static bool mmap_frag(abi_ulong real_start, abi_ulong start, abi_ulong last, in mmap_frag() argument
358 for (abi_ulong a = real_last; a > last; a -= TARGET_PAGE_SIZE) { in mmap_frag()
393 memset(g2h_untagged(start), 0, last - start + 1); in mmap_frag()
394 } else if (!mmap_pread(fd, g2h_untagged(start), last - start + 1, in mmap_frag()
515 /* Fail. This unaligned block must the last. */ in mmap_find_vma()
554 static abi_long mmap_end(abi_ulong start, abi_ulong last, in mmap_end() argument
564 page_set_flags(start, last, page_flags); in mmap_end()
571 if (passthrough_last < last) { in mmap_end()
572 page_set_flags(passthrough_last + 1, last, page_flags); in mmap_end()
575 shm_region_rm_complete(start, last); in mmap_end()
597 abi_ulong last; in mmap_h_eq_g() local
615 last = start + len - 1; in mmap_h_eq_g()
616 return mmap_end(start, last, start, last, flags, page_flags); in mmap_h_eq_g()
653 abi_ulong last, pass_last; in mmap_h_lt_g() local
764 last = start + len - 1; in mmap_h_lt_g()
766 pass_last = ROUND_UP(last - fileend_adj, host_page_size) - 1; in mmap_h_lt_g()
768 pass_last = last; in mmap_h_lt_g()
770 return mmap_end(start, last, start, pass_last, mmap_flags, page_flags); in mmap_h_lt_g()
786 abi_ulong last, real_start, real_last; in mmap_h_gt_g() local
808 last = start + len - 1; in mmap_h_gt_g()
809 return mmap_end(start, last, start, last, flags, page_flags); in mmap_h_gt_g()
825 last = start + len - 1; in mmap_h_gt_g()
827 real_last = ROUND_UP(last, host_page_size) - 1; in mmap_h_gt_g()
834 if (last <= real_page_last) { in mmap_h_gt_g()
836 if (!mmap_frag(real_start, start, last, target_prot, in mmap_h_gt_g()
840 return mmap_end(start, last, -1, 0, flags, page_flags); in mmap_h_gt_g()
850 if (last < real_last) { in mmap_h_gt_g()
852 if (!mmap_frag(real_page_start, real_page_start, last, in mmap_h_gt_g()
861 return mmap_end(start, last, -1, 0, flags, page_flags); in mmap_h_gt_g()
898 return mmap_end(start, last, -1, 0, flags, page_flags); in mmap_h_gt_g()
1022 abi_ulong last; in mmap_reserve_or_unmap() local
1027 last = start + len - 1; in mmap_reserve_or_unmap()
1029 real_last = ROUND_UP(last, host_page_size) - 1; in mmap_reserve_or_unmap()
1032 * If guest pages remain on the first or last host pages, in mmap_reserve_or_unmap()
1034 * The single page special case is required for the last page, in mmap_reserve_or_unmap()
1042 for (a = last; a < real_last; a += TARGET_PAGE_SIZE) { in mmap_reserve_or_unmap()
1056 for (prot = 0, a = last; a < real_last; a += TARGET_PAGE_SIZE) { in mmap_reserve_or_unmap()
1365 abi_ulong last; in target_shmat() local
1431 last = shmaddr + m_len - 1; in target_shmat()
1432 page_set_flags(shmaddr, last, in target_shmat()
1437 shm_region_rm_complete(shmaddr, last); in target_shmat()
1438 shm_region_add(shmaddr, last); in target_shmat()
1470 abi_ulong last = shm_region_find(shmaddr); in target_shmdt() local
1471 if (last == 0) { in target_shmdt()
1477 abi_ulong size = last - shmaddr + 1; in target_shmdt()
1479 page_set_flags(shmaddr, last, 0); in target_shmdt()
1480 shm_region_rm_complete(shmaddr, last); in target_shmdt()