Skip to content

Commit 759a1f9

Browse files
t-8chThomas Gleixner
authored andcommitted
powerpc/vdso: Provide clock_getres_time64()
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> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://patch.msgid.link/20260114-vdso-powerpc-align-v1-1-acf09373d568@linutronix.de
1 parent 10a62a0 commit 759a1f9

4 files changed

Lines changed: 21 additions & 0 deletions

File tree

arch/powerpc/include/asm/vdso/gettimeofday.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ int __c_kernel_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts,
135135
const struct vdso_time_data *vd);
136136
int __c_kernel_clock_getres(clockid_t clock_id, struct old_timespec32 *res,
137137
const struct vdso_time_data *vd);
138+
int __c_kernel_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec *res,
139+
const struct vdso_time_data *vd);
138140
#endif
139141
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,
140142
const struct vdso_time_data *vd);

arch/powerpc/kernel/vdso/gettimeofday.S

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
103103
cvdso_call __c_kernel_clock_getres
104104
V_FUNCTION_END(__kernel_clock_getres)
105105

106+
/*
107+
* Exact prototype of clock_getres_time64()
108+
*
109+
* int __kernel_clock_getres(clockid_t clock_id, struct __timespec64 *res);
110+
*
111+
*/
112+
#ifndef __powerpc64__
113+
V_FUNCTION_BEGIN(__kernel_clock_getres_time64)
114+
cvdso_call __c_kernel_clock_getres_time64
115+
V_FUNCTION_END(__kernel_clock_getres_time64)
116+
#endif
117+
106118

107119
/*
108120
* Exact prototype of time()

arch/powerpc/kernel/vdso/vdso32.lds.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ VERSION
124124
__kernel_clock_gettime;
125125
__kernel_clock_gettime64;
126126
__kernel_clock_getres;
127+
__kernel_clock_getres_time64;
127128
__kernel_time;
128129
__kernel_get_tbfreq;
129130
__kernel_sync_dicache;

arch/powerpc/kernel/vdso/vgettimeofday.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ int __c_kernel_clock_getres(clockid_t clock_id, struct old_timespec32 *res,
3535
{
3636
return __cvdso_clock_getres_time32_data(vd, clock_id, res);
3737
}
38+
39+
int __c_kernel_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec *res,
40+
const struct vdso_time_data *vd)
41+
{
42+
return __cvdso_clock_getres_data(vd, clock_id, res);
43+
}
3844
#endif
3945

4046
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,

0 commit comments

Comments
 (0)