diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-02-06 13:13:27 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-03-20 11:02:49 +0300 |
commit | e3028437cb45c04a9caae4d6372bfe08e70293cd (patch) | |
tree | 5bd6d96475e0cb09882435051e37da7cd0a12b03 /tools/testing/selftests/powerpc/include | |
parent | cabed14891c52618688533bd413b206bf2ebf5c5 (diff) | |
download | linux-e3028437cb45c04a9caae4d6372bfe08e70293cd.tar.xz |
selftests/powerpc: Refactor the AUXV routines
Refactor the AUXV routines so they are more composable. In a future test
we want to look for many AUXV entries and we don't want to have to read
/proc/self/auxv each time.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/include')
-rw-r--r-- | tools/testing/selftests/powerpc/include/utils.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/include/utils.h b/tools/testing/selftests/powerpc/include/utils.h index 53405e8a52ab..735815b3ad7f 100644 --- a/tools/testing/selftests/powerpc/include/utils.h +++ b/tools/testing/selftests/powerpc/include/utils.h @@ -24,7 +24,11 @@ typedef uint8_t u8; void test_harness_set_timeout(uint64_t time); int test_harness(int (test_function)(void), char *name); -extern void *get_auxv_entry(int type); + +int read_auxv(char *buf, ssize_t buf_size); +void *find_auxv_entry(int type, char *auxv); +void *get_auxv_entry(int type); + int pick_online_cpu(void); static inline bool have_hwcap(unsigned long ftr) |