diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2026-02-27 09:43:23 +0300 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2026-03-11 17:12:05 +0300 |
| commit | 0c02d6df15d4bf7376a965b66d92ad31b0e458fd (patch) | |
| tree | 3f70f4b391f8aa0ba816f831106f2cc6c76e228d /include | |
| parent | a657bebd7f02d0ec1ddb08c1d8c572fe1e187f9c (diff) | |
| download | linux-0c02d6df15d4bf7376a965b66d92ad31b0e458fd.tar.xz | |
vdso/gettimeofday: Move the unlikely() into vdso_read_retry()
All callers of vdso_read_retry() test its return value with unlikely().
Move the unlikely into the helper to make the code easier to read.
This is equivalent to the retry function of non-vDSO seqlocks.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260227-vdso-cleanups-v1-4-c848b4bc4850@linutronix.de
Diffstat (limited to 'include')
| -rw-r--r-- | include/vdso/helpers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h index 4d35877dff5f..197d233667c2 100644 --- a/include/vdso/helpers.h +++ b/include/vdso/helpers.h @@ -53,7 +53,7 @@ static __always_inline u32 vdso_read_retry(const struct vdso_clock *vc, smp_rmb(); seq = READ_ONCE(vc->seq); - return seq != start; + return unlikely(seq != start); } static __always_inline void vdso_write_seq_begin(struct vdso_clock *vc) |
