aboutsummaryrefslogtreecommitdiff
path: root/powerpc/pmu/lib.h
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2014-09-18 14:16:56 -0700
committerArthur She <arthur.she@linaro.org>2014-09-18 14:16:56 -0700
commit39e0e0dcb02d948940c79466c302b3db4c60f3d0 (patch)
tree117c21aa0b42865a321b078ddb71c410506c51c9 /powerpc/pmu/lib.h
parentc92da2541205425c520bc856dc6c87211c12595a (diff)
Update to d9773ceabfaf3f27b8a36fac035b74ee599df900 from repo git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git branch masterd9773ceabfaf3f27b8a36fac035b74ee599df900linux-mainline
Diffstat (limited to 'powerpc/pmu/lib.h')
-rw-r--r--powerpc/pmu/lib.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/powerpc/pmu/lib.h b/powerpc/pmu/lib.h
new file mode 100644
index 0000000..0f0339c
--- /dev/null
+++ b/powerpc/pmu/lib.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2014, Michael Ellerman, IBM Corp.
+ * Licensed under GPLv2.
+ */
+
+#ifndef __SELFTESTS_POWERPC_PMU_LIB_H
+#define __SELFTESTS_POWERPC_PMU_LIB_H
+
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+
+union pipe {
+ struct {
+ int read_fd;
+ int write_fd;
+ };
+ int fds[2];
+};
+
+extern int pick_online_cpu(void);
+extern int bind_to_cpu(int cpu);
+extern int kill_child_and_wait(pid_t child_pid);
+extern int wait_for_child(pid_t child_pid);
+extern int sync_with_child(union pipe read_pipe, union pipe write_pipe);
+extern int wait_for_parent(union pipe read_pipe);
+extern int notify_parent(union pipe write_pipe);
+extern int notify_parent_of_error(union pipe write_pipe);
+extern pid_t eat_cpu(int (test_function)(void));
+extern bool require_paranoia_below(int level);
+extern void *get_auxv_entry(int type);
+
+struct addr_range {
+ uint64_t first, last;
+};
+
+extern struct addr_range libc, vdso;
+
+int parse_proc_maps(void);
+
+#endif /* __SELFTESTS_POWERPC_PMU_LIB_H */