WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / vDSO / vdso_config.h
blob6a6fe8d4ff551ebc728d9f156429bbac71773005
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * vdso_config.h: Configuration options for vDSO tests.
4 * Copyright (c) 2019 Arm Ltd.
5 */
6 #ifndef __VDSO_CONFIG_H__
7 #define __VDSO_CONFIG_H__
9 /*
10 * Each architecture exports its vDSO implementation with different names
11 * and a different version from the others, so we need to handle it as a
12 * special case.
14 #if defined(__arm__)
15 #define VDSO_VERSION 0
16 #define VDSO_NAMES 1
17 #define VDSO_32BIT 1
18 #elif defined(__aarch64__)
19 #define VDSO_VERSION 3
20 #define VDSO_NAMES 0
21 #elif defined(__powerpc__)
22 #define VDSO_VERSION 1
23 #define VDSO_NAMES 0
24 #define VDSO_32BIT 1
25 #elif defined(__powerpc64__)
26 #define VDSO_VERSION 1
27 #define VDSO_NAMES 0
28 #elif defined (__s390__)
29 #define VDSO_VERSION 2
30 #define VDSO_NAMES 0
31 #define VDSO_32BIT 1
32 #elif defined (__s390X__)
33 #define VDSO_VERSION 2
34 #define VDSO_NAMES 0
35 #elif defined(__mips__)
36 #define VDSO_VERSION 0
37 #define VDSO_NAMES 1
38 #define VDSO_32BIT 1
39 #elif defined(__sparc__)
40 #define VDSO_VERSION 0
41 #define VDSO_NAMES 1
42 #define VDSO_32BIT 1
43 #elif defined(__i386__)
44 #define VDSO_VERSION 0
45 #define VDSO_NAMES 1
46 #define VDSO_32BIT 1
47 #elif defined(__x86_64__)
48 #define VDSO_VERSION 0
49 #define VDSO_NAMES 1
50 #elif defined(__riscv__)
51 #define VDSO_VERSION 5
52 #define VDSO_NAMES 1
53 #define VDSO_32BIT 1
54 #else /* nds32 */
55 #define VDSO_VERSION 4
56 #define VDSO_NAMES 1
57 #define VDSO_32BIT 1
58 #endif
60 static const char *versions[6] = {
61 "LINUX_2.6",
62 "LINUX_2.6.15",
63 "LINUX_2.6.29",
64 "LINUX_2.6.39",
65 "LINUX_4",
66 "LINUX_4.15",
69 static const char *names[2][6] = {
71 "__kernel_gettimeofday",
72 "__kernel_clock_gettime",
73 "__kernel_time",
74 "__kernel_clock_getres",
75 "__kernel_getcpu",
76 #if defined(VDSO_32BIT)
77 "__kernel_clock_gettime64",
78 #endif
81 "__vdso_gettimeofday",
82 "__vdso_clock_gettime",
83 "__vdso_time",
84 "__vdso_clock_getres",
85 "__vdso_getcpu",
86 #if defined(VDSO_32BIT)
87 "__vdso_clock_gettime64",
88 #endif
92 #endif /* __VDSO_CONFIG_H__ */