Skip to content

Commit 5646bbd

Browse files
Sebastian Andrzej SiewiorKAGA-KOKO
authored andcommitted
selftests: Emit a warning if getcpu() is missing on 32bit
The VDSO implementation for getcpu() has been wired up on 32bit so warn if missing. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 92d3306 commit 5646bbd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tools/testing/selftests/x86/test_vsyscall.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,8 @@ static void init_vdso(void)
9292
printf("[WARN]\tfailed to find time in vDSO\n");
9393

9494
vdso_getcpu = (getcpu_t)dlsym(vdso, "__vdso_getcpu");
95-
if (!vdso_getcpu) {
96-
/* getcpu() was never wired up in the 32-bit vDSO. */
97-
printf("[%s]\tfailed to find getcpu in vDSO\n",
98-
sizeof(long) == 8 ? "WARN" : "NOTE");
99-
}
95+
if (!vdso_getcpu)
96+
printf("[WARN]\tfailed to find getcpu in vDSO\n");
10097
}
10198

10299
static int init_vsys(void)

0 commit comments

Comments
 (0)