1 /* SPDX-License-Identifier: GPL-2.0 */
3 * vdso_config.h: Configuration options for vDSO tests.
4 * Copyright (c) 2019 Arm Ltd.
6 #ifndef __VDSO_CONFIG_H__
7 #define __VDSO_CONFIG_H__
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
15 #define VDSO_VERSION 0
18 #elif defined(__aarch64__)
19 #define VDSO_VERSION 3
21 #elif defined(__powerpc64__)
22 #define VDSO_VERSION 1
24 #elif defined(__powerpc__)
25 #define VDSO_VERSION 1
28 #elif defined (__s390__) && !defined(__s390x__)
29 #define VDSO_VERSION 2
32 #elif defined (__s390x__)
33 #define VDSO_VERSION 2
35 #elif defined(__mips__)
36 #define VDSO_VERSION 0
39 #elif defined(__sparc__)
40 #define VDSO_VERSION 0
43 #elif defined(__i386__)
44 #define VDSO_VERSION 0
47 #elif defined(__x86_64__)
48 #define VDSO_VERSION 0
50 #elif defined(__riscv__) || defined(__riscv)
51 #define VDSO_VERSION 5
53 #if __riscv_xlen == 32
56 #elif defined(__loongarch__)
57 #define VDSO_VERSION 6
61 static const char *versions
[7] = {
71 static const char *names
[2][7] = {
73 "__kernel_gettimeofday",
74 "__kernel_clock_gettime",
76 "__kernel_clock_getres",
78 "__kernel_clock_gettime64",
82 "__vdso_gettimeofday",
83 "__vdso_clock_gettime",
85 "__vdso_clock_getres",
87 "__vdso_clock_gettime64",
92 #endif /* __VDSO_CONFIG_H__ */