]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
vdso/gettimeofday: Rename __arch_get_vdso_u_timens_data()
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 19 May 2026 06:14:20 +0000 (08:14 +0200)
committerThomas Gleixner <tglx@kernel.org>
Thu, 4 Jun 2026 16:22:45 +0000 (18:22 +0200)
Originally this function was supposed to work the same way as
__arch_get_vdso_u_time_data() and be overridden on some architectures.
However the actually used implementation, which just adds PAGE_SIZE, does
not need this override mechanism.

Adjust the name to reflect the true nature of the function.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260519-vdso-arch_get_vdso_u_timens_data-v1-1-43f0d62716e8@linutronix.de
lib/vdso/gettimeofday.c

index da224011fafd93c9b980853858806612f442d245..e0f289d3d11061f30e4340583243ed4b5b5e35bb 100644 (file)
@@ -126,7 +126,7 @@ bool vdso_get_timestamp(const struct vdso_time_data *vd, const struct vdso_clock
 }
 
 static __always_inline
-const struct vdso_time_data *__arch_get_vdso_u_timens_data(const struct vdso_time_data *vd)
+const struct vdso_time_data *vdso_timens_data(const struct vdso_time_data *vd)
 {
        return (void *)vd + PAGE_SIZE;
 }
@@ -135,7 +135,7 @@ static __always_inline
 bool do_hres_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns,
                    clockid_t clk, struct __kernel_timespec *ts)
 {
-       const struct vdso_time_data *vd = __arch_get_vdso_u_timens_data(vdns);
+       const struct vdso_time_data *vd = vdso_timens_data(vdns);
        const struct timens_offset *offs = &vcns->offset[clk];
        const struct vdso_clock *vc = vd->clock_data;
        u32 seq;
@@ -191,7 +191,7 @@ static __always_inline
 bool do_coarse_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns,
                      clockid_t clk, struct __kernel_timespec *ts)
 {
-       const struct vdso_time_data *vd = __arch_get_vdso_u_timens_data(vdns);
+       const struct vdso_time_data *vd = vdso_timens_data(vdns);
        const struct timens_offset *offs = &vcns->offset[clk];
        const struct vdso_clock *vc = vd->clock_data;
        const struct vdso_timestamp *vdso_ts;
@@ -250,7 +250,7 @@ bool do_aux(const struct vdso_time_data *vd, clockid_t clock, struct __kernel_ti
        do {
                while (vdso_read_begin_timens(vc, &seq)) {
                        /* Re-read from the real time data page, reload seq by looping */
-                       vd = __arch_get_vdso_u_timens_data(vd);
+                       vd = vdso_timens_data(vd);
                        vc = &vd->aux_clock_data[idx];
                }
 
@@ -360,7 +360,7 @@ __cvdso_gettimeofday_data(const struct vdso_time_data *vd,
 
        if (unlikely(tz != NULL)) {
                if (vdso_is_timens_clock(vc))
-                       vd = __arch_get_vdso_u_timens_data(vd);
+                       vd = vdso_timens_data(vd);
 
                tz->tz_minuteswest = vd[CS_HRES_COARSE].tz_minuteswest;
                tz->tz_dsttime = vd[CS_HRES_COARSE].tz_dsttime;
@@ -383,7 +383,7 @@ __cvdso_time_data(const struct vdso_time_data *vd, __kernel_old_time_t *time)
        __kernel_old_time_t t;
 
        if (vdso_is_timens_clock(vc)) {
-               vd = __arch_get_vdso_u_timens_data(vd);
+               vd = vdso_timens_data(vd);
                vc = vd->clock_data;
        }
 
@@ -414,7 +414,7 @@ bool __cvdso_clock_getres_common(const struct vdso_time_data *vd, clockid_t cloc
                return false;
 
        if (vdso_is_timens_clock(vc))
-               vd = __arch_get_vdso_u_timens_data(vd);
+               vd = vdso_timens_data(vd);
 
        /*
         * Convert the clockid to a bitmask and use it to check which