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:23 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-04-19 02:30:03 +0300
commitbd4d67e76f699688d15e6194f1505b8bdfee0dd7 (patch)
treed117181cab8200dd1f030694085cdaea3a2519d9 /tools/testing/selftests/mm/vm_util.h
parent4b54f5a758b7ac521d4658cb0d18b132b87597c0 (diff)
downloadlinux-bd4d67e76f699688d15e6194f1505b8bdfee0dd7.tar.xz
selftests/mm: merge default_huge_page_size() into one
There're already 3 same definitions of the three functions. Move it into vm_util.[ch]. Link: https://lkml.kernel.org/r/20230412164223.328134-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Axel Rasmussen <axelrasmussen@google.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Dmitry Safonov <0x7f454c46@gmail.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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h
index 6edeb531afc6..d7163fff8fb7 100644
--- a/tools/testing/selftests/mm/vm_util.h
+++ b/tools/testing/selftests/mm/vm_util.h
@@ -35,6 +35,7 @@ bool check_huge_anon(void *addr, int nr_hpages, uint64_t hpage_size);
bool check_huge_file(void *addr, int nr_hpages, uint64_t hpage_size);
bool check_huge_shmem(void *addr, int nr_hpages, uint64_t hpage_size);
int64_t allocate_transhuge(void *ptr, int pagemap_fd);
+unsigned long default_huge_page_size(void);
/*
* On ppc64 this will only work with radix 2M hugepage size