From nobody Tue Apr 7 23:42:31 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4D4D3EAC84; Wed, 11 Mar 2026 09:31:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773221499; cv=none; b=CYMItQ6NoQr1280lpt8OVFpJAHC1PobWfIlIssr7TuWcRvgO7yxJnKc0bSq4T7pidaiChSKf/fYiZKOpsmPgb4VopY/P4kYNC9TLJDF+PaLQuYYuP+BCuOPO8JoI9/RzqjMj9SG/JV6OeVVGsFeXTzoDO02gvXZbKbM2kBXtIo8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773221499; c=relaxed/simple; bh=PmNfo+/KOC2AH1FuT0592mfNbmjTBu2jQSHbykCLg0U=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=uySdaQpa8MEgmcWeTr70xjc0ZnqZ4ubdSPi9Fv6O5xmkL7yTZNofoYU/3dm4fzQfJx6nqUCUbwGRzTDY1SEvY/G6p1gbkkQ1HvtUNS1NFJ0XjpU9VALRQPeypKhvrFU8MC8y4EKOInXWHXYUW8MIlOl/2N2ecjJ26Fiz8UBNzRU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rBBABy6w; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qWX8mDF2; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rBBABy6w"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qWX8mDF2" Date: Wed, 11 Mar 2026 09:31:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773221496; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CAqf/TvIAKjIS3mJMwyoe53yvRd1DCUKfriimg8GEDU=; b=rBBABy6wM9GhZA8neMhXqozE5ZUobWMjlsoNZi2AnPiqs4HI8/xbriJL+Umo+oLcwzm0Ma tmHIBhriMmVZEpQURFSw3whoJ6LDOU95aM+oayVnfUIxzDdxhknnxPVLGpxrQq6IgirIJ7 grmzJKPSI0iSBXWpfS3+E1z2w617KXDgG+E1Rv4i4wlfH1/+oou3Ua1LBVxbefIdG6M1v7 QZOvlCUfCKNFp59VrHlF/8lrxW/lcf1g+Su8MkMjyTFMg60v+lx5s+6kRz+LIkoODCuRma crF8OjDDhGOgsPYhS9EwZCjSRHrTJBBPsmXbN7G3X/78aTqAt9pc9uRVOACukg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773221496; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CAqf/TvIAKjIS3mJMwyoe53yvRd1DCUKfriimg8GEDU=; b=qWX8mDF29o4sO7q4bG2N59gaCN7SYca8WCkqnnsqDgjrxHZd35eloX6vcP25Uy3EvUP7Pm Gg85ZEnXRDuS2ADw== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/vdso] sparc64: vdso: Implement clock_gettime64() Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , Andreas Larsson , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260304-vdso-sparc64-generic-2-v6-13-d8eb3b0e1410@linutronix.de> References: <20260304-vdso-sparc64-generic-2-v6-13-d8eb3b0e1410@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177322149532.1647592.7460217739623735271.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/vdso branch of tip: Commit-ID: 1628f6a742702071e9d67c47185562e3ab6e6755 Gitweb: https://git.kernel.org/tip/1628f6a742702071e9d67c47185562e3a= b6e6755 Author: Thomas Wei=C3=9Fschuh AuthorDate: Wed, 04 Mar 2026 08:49:10 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 11 Mar 2026 10:18:33 +01:00 sparc64: vdso: Implement clock_gettime64() To be y2038-safe, 32-bit userspace needs to explicitly call the 64-bit safe time APIs. Implement clock_gettime64() in the 32-bit vDSO. Signed-off-by: Thomas Wei=C3=9Fschuh Signed-off-by: Thomas Gleixner Tested-by: Andreas Larsson Reviewed-by: Andreas Larsson Acked-by: Andreas Larsson Link: https://patch.msgid.link/20260304-vdso-sparc64-generic-2-v6-13-d8eb3b= 0e1410@linutronix.de --- arch/sparc/include/asm/vdso/gettimeofday.h | 20 ++++++++++++++++++-- arch/sparc/vdso/vclock_gettime.c | 8 ++++++++ arch/sparc/vdso/vdso32/vdso32.lds.S | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/vdso/gettimeofday.h b/arch/sparc/includ= e/asm/vdso/gettimeofday.h index a35875f..b0c80c8 100644 --- a/arch/sparc/include/asm/vdso/gettimeofday.h +++ b/arch/sparc/include/asm/vdso/gettimeofday.h @@ -101,6 +101,8 @@ static __always_inline u64 __arch_get_hw_counter(s32 cl= ock_mode, const struct vd "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62", \ "cc", "memory" =20 +#ifdef CONFIG_SPARC64 + static __always_inline long clock_gettime_fallback(clockid_t clock, struct __kernel_timespec *ts) { @@ -113,7 +115,20 @@ long clock_gettime_fallback(clockid_t clock, struct __= kernel_timespec *ts) return o0; } =20 -#ifndef CONFIG_SPARC64 +#else /* !CONFIG_SPARC64 */ + +static __always_inline +long clock_gettime_fallback(clockid_t clock, struct __kernel_timespec *ts) +{ + register long num __asm__("g1") =3D __NR_clock_gettime64; + register long o0 __asm__("o0") =3D clock; + register long o1 __asm__("o1") =3D (long) ts; + + __asm__ __volatile__(SYSCALL_STRING : "=3Dr" (o0) : "r" (num), + "0" (o0), "r" (o1) : SYSCALL_CLOBBERS); + return o0; +} + static __always_inline long clock_gettime32_fallback(clockid_t clock, struct old_timespec32 *ts) { @@ -125,7 +140,8 @@ long clock_gettime32_fallback(clockid_t clock, struct o= ld_timespec32 *ts) "0" (o0), "r" (o1) : SYSCALL_CLOBBERS); return o0; } -#endif + +#endif /* CONFIG_SPARC64 */ =20 static __always_inline long gettimeofday_fallback(struct __kernel_old_timeval *tv, struct timezon= e *tz) diff --git a/arch/sparc/vdso/vclock_gettime.c b/arch/sparc/vdso/vclock_gett= ime.c index 093a7ff..1d98593 100644 --- a/arch/sparc/vdso/vclock_gettime.c +++ b/arch/sparc/vdso/vclock_gettime.c @@ -48,4 +48,12 @@ int __vdso_clock_gettime(clockid_t clock, struct old_tim= espec32 *ts) int clock_gettime(clockid_t, struct old_timespec32 *) __weak __alias(__vdso_clock_gettime); =20 +int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts) +{ + return __cvdso_clock_gettime(clock, ts); +} + +int clock_gettime64(clockid_t, struct __kernel_timespec *) + __weak __alias(__vdso_clock_gettime64); + #endif diff --git a/arch/sparc/vdso/vdso32/vdso32.lds.S b/arch/sparc/vdso/vdso32/v= dso32.lds.S index 53575ee..a14e4f7 100644 --- a/arch/sparc/vdso/vdso32/vdso32.lds.S +++ b/arch/sparc/vdso/vdso32/vdso32.lds.S @@ -17,6 +17,8 @@ VERSION { global: clock_gettime; __vdso_clock_gettime; + clock_gettime64; + __vdso_clock_gettime64; gettimeofday; __vdso_gettimeofday; local: *;