From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Shuah Khan <shuah@kernel.org>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
John Stultz <jstultz@google.com>,
Stephen Boyd <sboyd@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org,
"Richard Cochran" <richardcochran@gmail.com>,
"Christopher Hall" <christopher.s.hall@intel.com>,
"Frederic Weisbecker" <frederic@kernel.org>,
"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
"Miroslav Lichvar" <mlichvar@redhat.com>,
"Werner Abt" <werner.abt@meinberg-usa.com>,
"David Woodhouse" <dwmw2@infradead.org>,
"Stephen Boyd" <sboyd@kernel.org>,
"Kurt Kanzenbach" <kurt@linutronix.de>,
"Nam Cao" <namcao@linutronix.de>,
"Antoine Tenart" <atenart@kernel.org>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH 00/14] vdso: Add support for auxiliary clocks
Date: Tue, 01 Jul 2025 10:57:54 +0200 [thread overview]
Message-ID: <20250701-vdso-auxclock-v1-0-df7d9f87b9b8@linutronix.de> (raw)
Extend the vDSO for fast-path access to auxiliary clocks (CLOCK_AUX).
The implementation is based on the generic vDSO infrastructure and works for
all its supported architectures.
Namely x86, arm, arm64, riscv, powerpc, loongarch and s390.
No changes to userspace are necessary.
Based on timers/ptp of tip.git.
This also depends on v6.16-rc2 *exactly*.
The specific dependency is commit 11fcf368506d ("uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again"),
which is available in v6.16-rc2.
Unfortunately that got broken again in v6.16-rc3 by
commit fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources").
Another fix for this is pending [0] and should make it into v6.16.
[0] https://lore.kernel.org/lkml/20250630-uapi-genmask-v1-1-eb0ad956a83e@linutronix.de/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (14):
selftests/timers: Add testcase for auxiliary clocks
vdso/vsyscall: Introduce a helper to fill clock configurations
vdso/vsyscall: Split up __arch_update_vsyscall() into __arch_update_vdso_clock()
vdso/helpers: Add helpers for seqlocks of single vdso_clock
vdso/gettimeofday: Return bool from clock_getres() helpers
vdso/gettimeofday: Return bool from clock_gettime() helpers
vdso/gettimeofday: Introduce vdso_clockid_valid()
vdso/gettimeofday: Introduce vdso_set_timespec()
vdso/gettimeofday: Introduce vdso_get_timestamp()
vdso: Introduce aux_clock_resolution_ns()
vdso/vsyscall: Update auxiliary clock data in the datapage
vdso/gettimeofday: Add support for auxiliary clocks
Revert "selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers"
selftests/timers/auxclock: Test vDSO functionality
arch/arm64/include/asm/vdso/vsyscall.h | 7 +-
include/asm-generic/vdso/vsyscall.h | 6 +-
include/linux/timekeeper_internal.h | 13 +
include/vdso/auxclock.h | 13 +
include/vdso/datapage.h | 5 +
include/vdso/helpers.h | 40 ++-
kernel/time/namespace.c | 5 +
kernel/time/timekeeping.c | 18 +-
kernel/time/vsyscall.c | 70 ++++--
lib/vdso/gettimeofday.c | 212 ++++++++++------
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/timers/Makefile | 2 +-
tools/testing/selftests/timers/auxclock.c | 406 ++++++++++++++++++++++++++++++
tools/testing/selftests/vDSO/Makefile | 2 -
tools/testing/selftests/vDSO/parse_vdso.c | 3 +-
15 files changed, 683 insertions(+), 120 deletions(-)
---
base-commit: 4e83b31e48cf2e62aeaed5cd9875c851e36a90d9
change-id: 20250630-vdso-auxclock-97abdf8e042a
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
next reply other threads:[~2025-07-01 8:58 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 8:57 Thomas Weißschuh [this message]
2025-07-01 8:57 ` [PATCH 01/14] selftests/timers: Add testcase for auxiliary clocks Thomas Weißschuh
2025-07-01 8:57 ` [PATCH 02/14] vdso/vsyscall: Introduce a helper to fill clock configurations Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:57 ` [PATCH 03/14] vdso/vsyscall: Split up __arch_update_vsyscall() into __arch_update_vdso_clock() Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:57 ` [PATCH 04/14] vdso/helpers: Add helpers for seqlocks of single vdso_clock Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:57 ` [PATCH 05/14] vdso/gettimeofday: Return bool from clock_getres() helpers Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
[not found] ` <CGME20250708151720eucas1p260f984fd95d3460d3e9f6c9b48e0e25c@eucas1p2.samsung.com>
2025-07-08 15:17 ` [PATCH 06/14] " Marek Szyprowski
[not found] ` <CGME20250708154921eucas1p1fd8fa4374610a991ca5c67bd612ca0c2@eucas1p1.samsung.com>
2025-07-08 15:49 ` Marek Szyprowski
2025-07-09 7:34 ` Thomas Weißschuh
2025-07-09 8:04 ` Marek Szyprowski
2025-07-16 12:25 ` Mark Brown
2025-07-16 12:34 ` Thomas Weißschuh
2025-07-16 12:50 ` Mark Brown
2025-07-16 13:23 ` Thomas Weißschuh
2025-07-16 14:35 ` Mark Brown
2025-07-18 12:02 ` Thomas Weißschuh
2025-07-19 11:16 ` David Laight
2025-07-09 8:29 ` Mark Brown
2025-07-09 9:57 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 12:42 ` CONFIG_DEVMEM=y breaks gettimeofday in next-20250708 Bert Karwatzki
2025-07-09 13:17 ` Thomas Weißschuh
2025-07-09 16:40 ` Bert Karwatzki
2025-07-18 11:56 ` [tip: timers/ptp] vdso/gettimeofday: Return bool from clock_gettime() helpers tip-bot2 for Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 07/14] vdso/gettimeofday: Introduce vdso_clockid_valid() Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 08/14] vdso/gettimeofday: Introduce vdso_set_timespec() Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 09/14] vdso/gettimeofday: Introduce vdso_get_timestamp() Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 10/14] vdso: Introduce aux_clock_resolution_ns() Thomas Weißschuh
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 11/14] vdso/vsyscall: Update auxiliary clock data in the datapage Thomas Weißschuh
2025-07-07 6:57 ` Thomas Gleixner
2025-07-07 11:34 ` Arnd Bergmann
2025-07-07 13:16 ` Thomas Gleixner
2025-07-07 14:48 ` Arnd Bergmann
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56 ` tip-bot2 for Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 12/14] vdso/gettimeofday: Add support for auxiliary clocks Thomas Weißschuh
2025-07-06 19:31 ` Thomas Gleixner
2025-07-07 7:11 ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 9:57 ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56 ` tip-bot2 for Thomas Weißschuh
2025-07-18 12:14 ` tip-bot2 for Thomas Weißschuh
2025-08-20 8:03 ` [PATCH 12/14] " John Stultz
2025-08-20 10:15 ` Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 13/14] Revert "selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers" Thomas Weißschuh
2025-07-06 20:43 ` Thomas Gleixner
2025-07-07 6:21 ` Thomas Weißschuh
2025-07-01 8:58 ` [PATCH 14/14] selftests/timers/auxclock: Test vDSO functionality Thomas Weißschuh
2025-07-06 20:26 ` Thomas Gleixner
2025-07-07 7:17 ` Thomas Weißschuh
2025-07-07 13:18 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250701-vdso-auxclock-v1-0-df7d9f87b9b8@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=arnd@arndb.de \
--cc=atenart@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=christopher.s.hall@intel.com \
--cc=dwmw2@infradead.org \
--cc=frederic@kernel.org \
--cc=jstultz@google.com \
--cc=kurt@linutronix.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mlichvar@redhat.com \
--cc=namcao@linutronix.de \
--cc=richardcochran@gmail.com \
--cc=sboyd@kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=vincenzo.frascino@arm.com \
--cc=werner.abt@meinberg-usa.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).