]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
MIPS: VDSO: Fold MIPS_DISABLE_VDSO into MIPS_GENERIC_GETTIMEOFDAY
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Thu, 21 May 2026 06:53:21 +0000 (08:53 +0200)
committerThomas Gleixner <tglx@kernel.org>
Tue, 9 Jun 2026 15:02:10 +0000 (17:02 +0200)
The currently used MIPS_DISABLE_VDSO will disable only the userspace
bits of the time-related vDSO. The kernel part is still pointlessly
built and running.

Remove MIPS_DISABLE_VDSO 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-7-2f79dcd6c78f@linutronix.de
arch/mips/Kconfig
arch/mips/vdso/Kconfig [deleted file]
arch/mips/vdso/Makefile
arch/mips/vdso/vdso.lds.S

index f56e1a5f5cd9d0154b91aae9ce0a300a1bb10285..6463b0b1e165357e7e98e4a4dce9a6266afeb055 100644 (file)
@@ -3171,6 +3171,10 @@ config MIPS_GENERIC_GETTIMEOFDAY
        def_bool y
        select GENERIC_GETTIMEOFDAY
        select HAVE_GENERIC_VDSO
+       # 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.
+       depends on !CPU_MICROMIPS
 
 menu "CPU Power Management"
 
@@ -3183,5 +3187,3 @@ source "drivers/cpuidle/Kconfig"
 endmenu
 
 source "arch/mips/kvm/Kconfig"
-
-source "arch/mips/vdso/Kconfig"
diff --git a/arch/mips/vdso/Kconfig b/arch/mips/vdso/Kconfig
deleted file mode 100644 (file)
index 7014024..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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.
-
-config MIPS_DISABLE_VDSO
-       def_bool CPU_MICROMIPS
index 69d4593f64fee593c9ea5b030eabdea40b39b89a..00d3ba2c482acdfdd6657288360eb6eba1f15207 100644 (file)
@@ -4,7 +4,7 @@
 # Include the generic Makefile to check the built vdso.
 include $(srctree)/lib/vdso/Makefile.include
 
-obj-vdso-y := elf.o vgettimeofday.o sigreturn.o
+obj-vdso-y := elf.o sigreturn.o
 
 # Common compiler flags between ABIs.
 ccflags-vdso := \
@@ -36,6 +36,7 @@ aflags-vdso := $(ccflags-vdso) \
        -D__ASSEMBLY__ -Wa,-gdwarf-2
 
 ifneq ($(c-gettimeofday-y),)
+obj-vdso-y += vgettimeofday.o
 CFLAGS_vgettimeofday.o = -include $(c-gettimeofday-y)
 
 # config-n32-o32-env.c prepares the environment to build a 32bit vDSO
@@ -47,10 +48,6 @@ endif
 
 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
 
-ifdef CONFIG_MIPS_DISABLE_VDSO
-  obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y))
-endif
-
 # VDSO linker flags.
 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
        $(filter -E%,$(KBUILD_CFLAGS)) -shared \
index 5d08be3a6b85c486f27be3a28c6ef4a1336c07cf..fd263b05d3e725a2e03cbac8b50d4b6f2d0a032c 100644 (file)
@@ -94,7 +94,7 @@ PHDRS
 VERSION
 {
        LINUX_2.6 {
-#ifndef CONFIG_MIPS_DISABLE_VDSO
+#ifdef CONFIG_GENERIC_GETTIMEOFDAY
        global:
                __vdso_clock_gettime;
 #ifdef CONFIG_MIPS_CLOCK_VSYSCALL