diff options
author | Arthur She <arthur.she@linaro.org> | 2014-09-15 17:14:06 -0700 |
---|---|---|
committer | Arthur She <arthur.she@linaro.org> | 2014-09-15 17:14:06 -0700 |
commit | 8d5e98a61f52513749e459c98bcafd060d88b79c (patch) | |
tree | 117c21aa0b42865a321b078ddb71c410506c51c9 /powerpc/pmu/lib.h | |
parent | 57621049dccbdd6a74d943ca81ddedaadac467fd (diff) |
Diffstat (limited to 'powerpc/pmu/lib.h')
-rw-r--r-- | powerpc/pmu/lib.h | 42 |
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 */ |