linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vdso/gettimeofday: Fix code refactoring
       [not found] <CGME20250710062301eucas1p1b61431dc31a5933087b45c246866fb17@eucas1p1.samsung.com>
@ 2025-07-10  6:22 ` Marek Szyprowski
  2025-07-10  6:45   ` Thomas Weißschuh
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Szyprowski @ 2025-07-10  6:22 UTC (permalink / raw)
  To: Thomas Gleixner, linux-kernel, linux-kselftest, linux-arm-kernel,
	linux-arch
  Cc: Marek Szyprowski, Andy Lutomirski, Vincenzo Frascino, Shuah Khan,
	Anna-Maria Behnsen, Frederic Weisbecker, John Stultz,
	Stephen Boyd, Catalin Marinas, Will Deacon, Arnd Bergmann,
	Richard Cochran, Christopher Hall, Miroslav Lichvar, Werner Abt,
	David Woodhouse, Kurt Kanzenbach, Nam Cao, Antoine Tenart

Commit fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime()
helpers") changed the return value from clock_gettime() helpers, but it
missed updating the one call to the do_hres() function, what breaks VDSO
operation on some of my ARM 32bit based test boards. Fix this.

Fixes: fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime() helpers")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 lib/vdso/gettimeofday.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index d6743ed756a1..97aa9059a5c9 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -395,7 +395,7 @@ __cvdso_gettimeofday_data(const struct vdso_time_data *vd,
 	if (likely(tv != NULL)) {
 		struct __kernel_timespec ts;
 
-		if (do_hres(vd, &vc[CS_HRES_COARSE], CLOCK_REALTIME, &ts))
+		if (!do_hres(vd, &vc[CS_HRES_COARSE], CLOCK_REALTIME, &ts))
 			return gettimeofday_fallback(tv, tz);
 
 		tv->tv_sec = ts.tv_sec;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vdso/gettimeofday: Fix code refactoring
  2025-07-10  6:22 ` [PATCH] vdso/gettimeofday: Fix code refactoring Marek Szyprowski
@ 2025-07-10  6:45   ` Thomas Weißschuh
  2025-07-10  7:27     ` Marek Szyprowski
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Weißschuh @ 2025-07-10  6:45 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Thomas Gleixner, linux-kernel, linux-kselftest, linux-arm-kernel,
	linux-arch, Andy Lutomirski, Vincenzo Frascino, Shuah Khan,
	Anna-Maria Behnsen, Frederic Weisbecker, John Stultz,
	Stephen Boyd, Catalin Marinas, Will Deacon, Arnd Bergmann,
	Richard Cochran, Christopher Hall, Miroslav Lichvar, Werner Abt,
	David Woodhouse, Kurt Kanzenbach, Nam Cao, Antoine Tenart

Hi Marek,

On Thu, Jul 10, 2025 at 08:22:49AM +0200, Marek Szyprowski wrote:
> Commit fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime()
> helpers") changed the return value from clock_gettime() helpers, but it
> missed updating the one call to the do_hres() function, what breaks VDSO
> operation on some of my ARM 32bit based test boards. Fix this.

Thanks again for the report and fix.
This change has already been folded into the original commit by tglx.
It should show up in todays -next tree.

> Fixes: fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime() helpers")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>


Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vdso/gettimeofday: Fix code refactoring
  2025-07-10  6:45   ` Thomas Weißschuh
@ 2025-07-10  7:27     ` Marek Szyprowski
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Szyprowski @ 2025-07-10  7:27 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Thomas Gleixner, linux-kernel, linux-kselftest, linux-arm-kernel,
	linux-arch, Andy Lutomirski, Vincenzo Frascino, Shuah Khan,
	Anna-Maria Behnsen, Frederic Weisbecker, John Stultz,
	Stephen Boyd, Catalin Marinas, Will Deacon, Arnd Bergmann,
	Richard Cochran, Christopher Hall, Miroslav Lichvar, Werner Abt,
	David Woodhouse, Kurt Kanzenbach, Nam Cao, Antoine Tenart

On 10.07.2025 08:45, Thomas Weißschuh wrote:
> On Thu, Jul 10, 2025 at 08:22:49AM +0200, Marek Szyprowski wrote:
>> Commit fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime()
>> helpers") changed the return value from clock_gettime() helpers, but it
>> missed updating the one call to the do_hres() function, what breaks VDSO
>> operation on some of my ARM 32bit based test boards. Fix this.
> Thanks again for the report and fix.
> This change has already been folded into the original commit by tglx.
> It should show up in todays -next tree.

Okay. I got no information about that, so I decided to send a patch just 
in case.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-10  7:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20250710062301eucas1p1b61431dc31a5933087b45c246866fb17@eucas1p1.samsung.com>
2025-07-10  6:22 ` [PATCH] vdso/gettimeofday: Fix code refactoring Marek Szyprowski
2025-07-10  6:45   ` Thomas Weißschuh
2025-07-10  7:27     ` Marek Szyprowski

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).