linux/include/vdso
Arnd Bergmann 42874e4eb3 arch: vdso: consolidate gettime prototypes
The VDSO functions are defined as globals in the kernel sources but intended
to be called from userspace, so there is no need to declare them in a kernel
side header.

Without a prototype, this now causes warnings such as

arch/mips/vdso/vgettimeofday.c:14:5: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes]
arch/mips/vdso/vgettimeofday.c:28:5: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes]
arch/mips/vdso/vgettimeofday.c:36:5: error: no previous prototype for '__vdso_clock_getres' [-Werror=missing-prototypes]
arch/mips/vdso/vgettimeofday.c:42:5: error: no previous prototype for '__vdso_clock_gettime64' [-Werror=missing-prototypes]
arch/sparc/vdso/vclock_gettime.c:254:1: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes]
arch/sparc/vdso/vclock_gettime.c:282:1: error: no previous prototype for '__vdso_clock_gettime_stick' [-Werror=missing-prototypes]
arch/sparc/vdso/vclock_gettime.c:307:1: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes]
arch/sparc/vdso/vclock_gettime.c:343:1: error: no previous prototype for '__vdso_gettimeofday_stick' [-Werror=missing-prototypes]

Most architectures have already added workarounds for these by adding
declarations somewhere, but since these are all compatible, we should
really just have one copy, with an #ifdef check for the 32-bit vs
64-bit variant and use that everywhere.

Unfortunately, the sparc an um versions are currently incompatible
since they never added support for __vdso_clock_gettime64() in 32-bit
userland. For the moment, I'm leaving this one out, as I can't
easily test it and it requires a larger rework.

Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-11-23 11:32:32 +01:00
..
bits.h vdso/bits.h: Add BIT_ULL() for the sake of consistency 2023-01-31 14:42:10 +01:00
clocksource.h vdso: Fix clocksource.h macro detection 2020-03-23 18:51:08 +01:00
const.h linux/const.h: Extract common header for vDSO 2020-03-21 15:23:53 +01:00
datapage.h lib/vdso: Allow to add architecture-specific vdso data 2020-08-06 10:57:30 +02:00
gettime.h arch: vdso: consolidate gettime prototypes 2023-11-23 11:32:32 +01:00
helpers.h lib/vdso: Add unlikely() hint into vdso_read_begin() 2020-01-14 12:20:47 +01:00
jiffies.h linux/jiffies.h: Extract common header for vDSO 2020-03-21 15:23:58 +01:00
ktime.h linux/ktime.h: Extract common header for vDSO 2020-03-21 15:23:59 +01:00
limits.h linux/limits.h: Extract common header for vDSO 2020-03-21 15:23:54 +01:00
math64.h linux/math64.h: Extract common header for vDSO 2020-03-21 15:23:56 +01:00
processor.h common: Introduce processor.h 2020-03-21 15:23:59 +01:00
time32.h linux/time32.h: Extract common header for vDSO 2020-03-21 15:23:57 +01:00
time64.h time64.h: Consolidated PSEC_PER_SEC definition 2021-04-06 16:32:17 -07:00
time.h linux/time.h: Extract common header for vDSO 2020-03-21 15:23:57 +01:00
vsyscall.h timekeeping/vsyscall: Provide vdso_update_begin/end() 2020-08-06 10:57:30 +02:00