Skip to content

Commit 21bbfd7

Browse files
t-8chThomas Gleixner
authored andcommitted
x86/vdso: Provide clock_getres_time64() for x86-32
For consistency with __vdso_clock_gettime64() there should also be a 64-bit variant of clock_getres(). This will allow the extension of CONFIG_COMPAT_32BIT_TIME to the vDSO and finally the removal of 32-bit time types from the kernel and UAPI. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20251223-vdso-compat-time32-v1-5-97ea7a06a543@linutronix.de
1 parent 4e6a231 commit 21bbfd7

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

arch/x86/entry/vdso/vclock_gettime.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,12 @@ int __vdso_clock_getres(clockid_t clock, struct old_timespec32 *res)
7474

7575
int clock_getres(clockid_t, struct old_timespec32 *)
7676
__attribute__((weak, alias("__vdso_clock_getres")));
77+
78+
int __vdso_clock_getres_time64(clockid_t clock, struct __kernel_timespec *ts)
79+
{
80+
return __cvdso_clock_getres(clock, ts);
81+
}
82+
83+
int clock_getres_time64(clockid_t, struct __kernel_timespec *)
84+
__attribute__((weak, alias("__vdso_clock_getres_time64")));
7785
#endif

arch/x86/entry/vdso/vdso32/vdso32.lds.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ VERSION
2828
__vdso_time;
2929
__vdso_clock_getres;
3030
__vdso_clock_gettime64;
31+
__vdso_clock_getres_time64;
3132
__vdso_getcpu;
3233
};
3334

0 commit comments

Comments
 (0)