]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
timekeeping: Prepare timekeeping_update_from_shadow()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 19 May 2025 08:33:26 +0000 (10:33 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 19 Jun 2025 12:28:23 +0000 (14:28 +0200)
Don't invoke the VDSO and paravirt updates when utilized for auxiliary
clocks. This is a temporary workaround until the VDSO and paravirt
interfaces have been worked out.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250519083026.223876435@linutronix.de
kernel/time/timekeeping.c

index 153f760dffb4e7dcc7db0abdf9a6346693ed3398..e3c1a1c1d8c59fb2298e0cd0edbca64f66a36b18 100644 (file)
@@ -683,13 +683,15 @@ static void timekeeping_update_from_shadow(struct tk_data *tkd, unsigned int act
 
        tk_update_leap_state(tk);
        tk_update_ktime_data(tk);
+       tk->tkr_mono.base_real = tk->tkr_mono.base + tk->offs_real;
 
-       update_vsyscall(tk);
-       update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET);
+       if (tk->id == TIMEKEEPER_CORE) {
+               update_vsyscall(tk);
+               update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET);
 
-       tk->tkr_mono.base_real = tk->tkr_mono.base + tk->offs_real;
-       update_fast_timekeeper(&tk->tkr_mono, &tk_fast_mono);
-       update_fast_timekeeper(&tk->tkr_raw,  &tk_fast_raw);
+               update_fast_timekeeper(&tk->tkr_mono, &tk_fast_mono);
+               update_fast_timekeeper(&tk->tkr_raw,  &tk_fast_raw);
+       }
 
        if (action & TK_CLOCK_WAS_SET)
                tk->clock_was_set_seq++;