Commit 4b81e2eb authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'timers-vdso-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull VDSO updates from Thomas Gleixner:

 - Further consolidation of the VDSO infrastructure and the common data
   store

 - Simplification of the related Kconfig logic

 - Improve the VDSO selftest suite

* tag 'timers-vdso-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  selftests: vDSO: Drop vdso_test_clock_getres
  selftests: vDSO: vdso_test_abi: Add tests for clock_gettime64()
  selftests: vDSO: vdso_test_abi: Test CPUTIME clocks
  selftests: vDSO: vdso_test_abi: Use explicit indices for name array
  selftests: vDSO: vdso_test_abi: Drop clock availability tests
  selftests: vDSO: vdso_test_abi: Use ksft_finished()
  selftests: vDSO: vdso_test_abi: Correctly skip whole test with missing vDSO
  selftests: vDSO: Fix -Wunitialized in powerpc VDSO_CALL() wrapper
  vdso: Add struct __kernel_old_timeval forward declaration to gettime.h
  vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO
  vdso: Drop Kconfig GENERIC_VDSO_TIME_NS
  vdso: Drop Kconfig GENERIC_VDSO_DATA_STORE
  vdso: Drop kconfig GENERIC_COMPAT_VDSO
  vdso: Drop kconfig GENERIC_VDSO_32
  riscv: vdso: Untangle Kconfig logic
  time: Build generic update_vsyscall() only with generic time vDSO
  vdso/gettimeofday: Remove !CONFIG_TIME_NS stubs
  vdso: Move ENABLE_COMPAT_VDSO from core to arm64
  ARM: VDSO: Remove cntvct_ok global variable
  vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY
parents 70de5572 e82bf757
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1657,7 +1657,7 @@ config HAVE_SPARSE_SYSCALL_NR
	  related optimizations for a given architecture.

config ARCH_HAS_VDSO_ARCH_DATA
	depends on GENERIC_VDSO_DATA_STORE
	depends on HAVE_GENERIC_VDSO
	bool

config ARCH_HAS_VDSO_TIME_DATA
+0 −2
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@
#include <vdso/datapage.h>
#include <asm/cacheflush.h>

extern bool cntvct_ok;

static __always_inline
void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)
{
+3 −7
Original line number Diff line number Diff line
@@ -54,11 +54,9 @@ struct elfinfo {
	char		*dynstr;	/* ptr to .dynstr section */
};

/* Cached result of boot-time check for whether the arch timer exists,
 * and if so, whether the virtual counter is useable.
/* Boot-time check for whether the arch timer exists, and if so,
 * whether the virtual counter is usable.
 */
bool cntvct_ok __ro_after_init;

static bool __init cntvct_functional(void)
{
	struct device_node *np;
@@ -159,7 +157,7 @@ static void __init patch_vdso(void *ehdr)
	 * want programs to incur the slight additional overhead of
	 * dispatching through the VDSO only to fall back to syscalls.
	 */
	if (!cntvct_ok) {
	if (!cntvct_functional()) {
		vdso_nullpatch_one(&einfo, "__vdso_gettimeofday");
		vdso_nullpatch_one(&einfo, "__vdso_clock_gettime");
		vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64");
@@ -197,8 +195,6 @@ static int __init vdso_init(void)
	vdso_total_pages = VDSO_NR_PAGES; /* for the data/vvar pages */
	vdso_total_pages += text_pages;

	cntvct_ok = cntvct_functional();

	patch_vdso(vdso_start);

	return 0;
+0 −2
Original line number Diff line number Diff line
@@ -926,9 +926,7 @@ config VDSO
	default y if ARM_ARCH_TIMER
	select HAVE_GENERIC_VDSO
	select GENERIC_TIME_VSYSCALL
	select GENERIC_VDSO_32
	select GENERIC_GETTIMEOFDAY
	select GENERIC_VDSO_DATA_STORE
	help
	  Place in the process address space an ELF shared object
	  providing fast implementations of gettimeofday and
+0 −3
Original line number Diff line number Diff line
@@ -166,8 +166,6 @@ config ARM64
	select GENERIC_SMP_IDLE_THREAD
	select GENERIC_TIME_VSYSCALL
	select GENERIC_GETTIMEOFDAY
	select GENERIC_VDSO_DATA_STORE
	select GENERIC_VDSO_TIME_NS
	select HARDIRQS_SW_RESEND
	select HAS_IOPORT
	select HAVE_MOVE_PMD
@@ -1750,7 +1748,6 @@ config COMPAT_VDSO
	bool "Enable vDSO for 32-bit applications"
	depends on !CPU_BIG_ENDIAN
	depends on (CC_IS_CLANG && LD_IS_LLD) || "$(CROSS_COMPILE_COMPAT)" != ""
	select GENERIC_COMPAT_VDSO
	default y
	help
	  Place in the process address space of 32-bit applications an
Loading