summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/vm/vm_util.h
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@collabora.com>2022-04-28 23:16:11 -0700
committerakpm <akpm@linux-foundation.org>2022-04-28 23:16:11 -0700
commit642bc52aed9c99e8c9c9cfb6781f77719717a36c (patch)
tree76b34f5c1fa976bf42f99ba75d1e21103ef01f81 /tools/testing/selftests/vm/vm_util.h
parent62e80f2b5072ed80a41fc6a272e44e8e17fdcf66 (diff)
downloadlinux-next-642bc52aed9c99e8c9c9cfb6781f77719717a36c.tar.gz
selftests: vm: bring common functions to a new file
Bring common functions to a new file while keeping code as much same as possible. These functions can be used in the new tests. This helps in avoiding code duplication. Link: https://lkml.kernel.org/r/20220420084036.4101604-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Gabriel Krisman Bertazi <krisman@collabora.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/vm/vm_util.h')
-rw-r--r--tools/testing/selftests/vm/vm_util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/selftests/vm/vm_util.h b/tools/testing/selftests/vm/vm_util.h
new file mode 100644
index 000000000000..2e512bd57ae1
--- /dev/null
+++ b/tools/testing/selftests/vm/vm_util.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <stdint.h>
+#include <stdbool.h>
+
+uint64_t pagemap_get_entry(int fd, char *start);
+bool pagemap_is_softdirty(int fd, char *start);
+void clear_softdirty(void);
+uint64_t read_pmd_pagesize(void);
+uint64_t check_huge(void *addr);