Lines Matching +full:close +full:- +full:range

1 // SPDX-License-Identifier: GPL-2.0
70 static int supported = -1; in pagemap_scan_supported()
73 if (supported != -1) in pagemap_scan_supported()
105 return page_entry_is(fd, start, "soft-dirty", in pagemap_is_softdirty()
125 /* If present (63th bit), PFN is at bit 0 -- 54. */ in pagemap_get_pfn()
128 return -1ul; in pagemap_get_pfn()
140 close(fd); in clear_softdirty()
161 if (fd == -1) in read_pmd_pagesize()
166 close(fd); in read_pmd_pagesize()
170 close(fd); in read_pmd_pagesize()
199 uint64_t thp = -1; in __check_huge()
205 ret = snprintf(addr_pattern, MAX_LINE_LENGTH, "%08lx-", in __check_huge()
256 MAP_NORESERVE | MAP_PRIVATE, -1, 0) != ptr) in allocate_transhuge()
266 (uintptr_t)ptr >> (pshift() - 3)) != sizeof(ent)) in allocate_transhuge()
271 !(PAGEMAP_PFN(ent[0]) & ((1 << (HPAGE_SHIFT - pshift())) - 1))) in allocate_transhuge()
274 return -1; in allocate_transhuge()
312 if (entry->d_type != DT_DIR) in detect_hugetlb_page_sizes()
314 if (sscanf(entry->d_name, "hugepages-%zukB", &kb) != 1) in detect_hugetlb_page_sizes()
324 /* If `ioctls' non-NULL, the allowed ioctls will be returned into the var */
339 uffdio_register.range.start = (unsigned long)addr; in uffd_register_with_ioctls()
340 uffdio_register.range.len = len; in uffd_register_with_ioctls()
343 if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) == -1) in uffd_register_with_ioctls()
344 ret = -errno; in uffd_register_with_ioctls()
360 struct uffdio_range range = { .start = (uintptr_t)addr, .len = len }; in uffd_unregister() local
363 if (ioctl(uffd, UFFDIO_UNREGISTER, &range) == -1) in uffd_unregister()
364 ret = -errno; in uffd_unregister()