Skip to content

Commit dc8dc57

Browse files
seehearfeelakpm00
authored andcommitted
selftests/vDSO: fix building errors on LoongArch
Patch series "selftests/vDSO: Fix errors on LoongArch", v4. This patch (of 2): There exist the following errors when build vDSO selftests on LoongArch: # make headers && cd tools/testing/selftests/vDSO && make ... error: 'VDSO_VERSION' undeclared (first use in this function) ... error: 'VDSO_NAMES' undeclared (first use in this function) We can see the following code in arch/loongarch/vdso/vdso.lds.S: VERSION { LINUX_5.10 { global: __vdso_getcpu; __vdso_clock_getres; __vdso_clock_gettime; __vdso_gettimeofday; __vdso_rt_sigreturn; local: *; }; } so VDSO_VERSION should be 6 and VDSO_NAMES should be 1 for LoongArch, add them to fix the building errors on LoongArch. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Tiezhu Yang <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Kees Cook <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vincenzo Frascino <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 77ddd72 commit dc8dc57

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/testing/selftests/vDSO/vdso_config.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,19 @@
5353
#if __riscv_xlen == 32
5454
#define VDSO_32BIT 1
5555
#endif
56+
#elif defined(__loongarch__)
57+
#define VDSO_VERSION 6
58+
#define VDSO_NAMES 1
5659
#endif
5760

58-
static const char *versions[6] = {
61+
static const char *versions[7] = {
5962
"LINUX_2.6",
6063
"LINUX_2.6.15",
6164
"LINUX_2.6.29",
6265
"LINUX_2.6.39",
6366
"LINUX_4",
6467
"LINUX_4.15",
68+
"LINUX_5.10"
6569
};
6670

6771
static const char *names[2][6] = {

0 commit comments

Comments
 (0)