summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/mm/vm_util.h
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2023-04-12 19:42:54 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-04-19 02:30:05 +0300
commit78391f6460ee2cb43f64bbdd7a7cf840e5a118a6 (patch)
treeb087843517f23c49f2d3ada5f0ec706dc64e85c7 /tools/testing/selftests/mm/vm_util.h
parentc4277cb6c8e5dc60d425f3a148b3e2bf40d8d778 (diff)
downloadlinux-78391f6460ee2cb43f64bbdd7a7cf840e5a118a6.tar.xz
selftests/mm: uffd_open_{dev|sys}()
Provide two helpers to open an uffd handle. Drop the error checks around SKIPs because it's inside an errexit() anyway, which IMHO doesn't really help much if the test will not continue. Link: https://lkml.kernel.org/r/20230412164254.328335-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Reviewed-by: Axel Rasmussen <axelrasmussen@google.com> Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Zach O'Keefe <zokeefe@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/mm/vm_util.h')
-rw-r--r--tools/testing/selftests/mm/vm_util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h
index 3a9762022efd..481354141533 100644
--- a/tools/testing/selftests/mm/vm_util.h
+++ b/tools/testing/selftests/mm/vm_util.h
@@ -48,6 +48,8 @@ unsigned long default_huge_page_size(void);
int uffd_register(int uffd, void *addr, uint64_t len,
bool miss, bool wp, bool minor);
int uffd_unregister(int uffd, void *addr, uint64_t len);
+int uffd_open_dev(unsigned int flags);
+int uffd_open_sys(unsigned int flags);
/*
* On ppc64 this will only work with radix 2M hugepage size