Lines Matching +full:close +full:- +full:range
1 // SPDX-License-Identifier: GPL-2.0
50 /* If present (63th bit), PFN is at bit 0 -- 54. */ in pagemap_get_pfn()
53 return -1ul; in pagemap_get_pfn()
65 close(fd); in clear_softdirty()
86 if (fd == -1) in read_pmd_pagesize()
91 close(fd); in read_pmd_pagesize()
95 close(fd); in read_pmd_pagesize()
103 uint64_t thp = -1; in __check_huge()
109 ret = snprintf(addr_pattern, MAX_LINE_LENGTH, "%08lx-", in __check_huge()
160 MAP_NORESERVE | MAP_PRIVATE, -1, 0) != ptr) in allocate_transhuge()
170 (uintptr_t)ptr >> (pshift() - 3)) != sizeof(ent)) in allocate_transhuge()
175 !(PAGEMAP_PFN(ent[0]) & ((1 << (HPAGE_SHIFT - pshift())) - 1))) in allocate_transhuge()
178 return -1; in allocate_transhuge()
216 if (entry->d_type != DT_DIR) in detect_hugetlb_page_sizes()
218 if (sscanf(entry->d_name, "hugepages-%zukB", &kb) != 1) in detect_hugetlb_page_sizes()
228 /* If `ioctls' non-NULL, the allowed ioctls will be returned into the var */
243 uffdio_register.range.start = (unsigned long)addr; in uffd_register_with_ioctls()
244 uffdio_register.range.len = len; in uffd_register_with_ioctls()
247 if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) == -1) in uffd_register_with_ioctls()
248 ret = -errno; in uffd_register_with_ioctls()
264 struct uffdio_range range = { .start = (uintptr_t)addr, .len = len }; in uffd_unregister() local
267 if (ioctl(uffd, UFFDIO_UNREGISTER, &range) == -1) in uffd_unregister()
268 ret = -errno; in uffd_unregister()