[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging-4.21] x86/time: do not kill calibration timer on suspend



commit 9c79644d359b24eadb2af1d40c5b2fa49e2bfc5a
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Mon Apr 20 12:27:45 2026 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Apr 20 12:27:45 2026 +0200

    x86/time: do not kill calibration timer on suspend
    
    A killed timer will ignore further set_timer() calls, and hence won't be
    re-armed unless it's initialized again.  Use stop_timer() instead of
    kill_timer() in time_suspend(), so that the set_timer() call in
    time_resume() successfully re-arms the timer.  Otherwise time calibration
    is no longer scheduled (and executed) after resuming from S3 suspend.
    
    Fixes: 6d90db1a2ca1 ("x86: rendezvous-based local time calibration")
    Reported-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Tested-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
    master commit: 2d670d258b2e592d44deb5ee12e7c2ba1d79d8a9
    master date: 2026-04-10 14:31:10 +0200
---
 xen/arch/x86/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 3b451525a9..bb36038e0c 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -2720,7 +2720,7 @@ int time_suspend(void)
     {
         cmos_utc_offset = -get_wallclock_time();
         cmos_utc_offset += get_sec();
-        kill_timer(&calibration_timer);
+        stop_timer(&calibration_timer);
 
         /* Sync platform timer stamps. */
         platform_time_calibration();
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.