]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
MIPS: VDSO: Fold MIPS_CLOCK_VSYSCALL into MIPS_GENERIC_GETTIMEOFDAY
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Thu, 21 May 2026 06:53:23 +0000 (08:53 +0200)
committerThomas Gleixner <tglx@kernel.org>
Tue, 9 Jun 2026 15:02:10 +0000 (17:02 +0200)
This configuration option exists so "that we don't provide the symbol
when there's no possibility of there being a usable clocksource".
However it only covers __vdso_gettimeofday() and none of the other vDSO
functions which should be affected by the same circumstances.slightly slightly.

Remove MIPS_CLOCK_VSYSCALL and fold its usecase into
MIPS_GENERIC_GETTIMEOFDAY, which works correctly.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Daniel Lezcano <daniel.lezcano@kernel.org>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@vger.kernel.org
Link: https://patch.msgid.link/20260521-vdso-mips-kconfig-v1-9-2f79dcd6c78f@linutronix.de
arch/mips/Kconfig
arch/mips/vdso/vdso.lds.S
arch/mips/vdso/vgettimeofday.c

index ccc66e3df1f98be67e6aaaa383c012176e6124e8..323ca084e79a8cddba98250625b84b56c693bc85 100644 (file)
@@ -1133,9 +1133,6 @@ config CSRC_R4K
 config CSRC_SB1250
        bool
 
-config MIPS_CLOCK_VSYSCALL
-       def_bool CSRC_R4K || CLKSRC_MIPS_GIC
-
 config GPIO_TXX9
        select GPIOLIB
        bool
@@ -3171,6 +3168,7 @@ config MIPS_GENERIC_GETTIMEOFDAY
        def_bool y
        select GENERIC_GETTIMEOFDAY
        select HAVE_GENERIC_VDSO
+       depends on CSRC_R4K || CLKSRC_MIPS_GIC
        # GCC (at least up to version 9.2) appears to emit function calls that make use
        # of the GOT when targeting microMIPS, which we can't use in the VDSO due to
        # the lack of relocations. As such, we disable the VDSO for microMIPS builds.
index fd263b05d3e725a2e03cbac8b50d4b6f2d0a032c..05badf3ae0ff3be6aa52888625da8b9fd53863c7 100644 (file)
@@ -97,9 +97,7 @@ VERSION
 #ifdef CONFIG_GENERIC_GETTIMEOFDAY
        global:
                __vdso_clock_gettime;
-#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
                __vdso_gettimeofday;
-#endif
                __vdso_clock_getres;
 #if _MIPS_SIM != _MIPS_SIM_ABI64
                __vdso_clock_gettime64;
index 1d236215e8f641c2adad16a088ae7c05e322cff1..00f9fcfc327e88636e3dd74791fa48087ac03891 100644 (file)
@@ -18,22 +18,12 @@ int __vdso_clock_gettime(clockid_t clock,
        return __cvdso_clock_gettime32(clock, ts);
 }
 
-#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
-
-/*
- * This is behind the ifdef so that we don't provide the symbol when there's no
- * possibility of there being a usable clocksource, because there's nothing we
- * can do without it. When libc fails the symbol lookup it should fall back on
- * the standard syscall path.
- */
 int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
                        struct timezone *tz)
 {
        return __cvdso_gettimeofday(tv, tz);
 }
 
-#endif /* CONFIG_MIPS_CLOCK_VSYSCALL */
-
 int __vdso_clock_getres(clockid_t clock_id,
                        struct old_timespec32 *res)
 {
@@ -59,22 +49,12 @@ int __vdso_clock_gettime(clockid_t clock,
        return __cvdso_clock_gettime(clock, ts);
 }
 
-#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
-
-/*
- * This is behind the ifdef so that we don't provide the symbol when there's no
- * possibility of there being a usable clocksource, because there's nothing we
- * can do without it. When libc fails the symbol lookup it should fall back on
- * the standard syscall path.
- */
 int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
                        struct timezone *tz)
 {
        return __cvdso_gettimeofday(tv, tz);
 }
 
-#endif /* CONFIG_MIPS_CLOCK_VSYSCALL */
-
 int __vdso_clock_getres(clockid_t clock_id,
                        struct __kernel_timespec *res)
 {