WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86, s3: Sync platform stamps at time sus

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86, s3: Sync platform stamps at time suspend.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Nov 2008 08:10:47 -0800
Delivery-date: Wed, 19 Nov 2008 08:13:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1227100651 0
# Node ID 4c67985c552e88c03b0d446f34c47bd382d2d702
# Parent  390ef36eb5962f61de0c8200a83f7c3d05a505d4
x86, s3: Sync platform stamps at time suspend.

platform_timer_stamp and stime_platform_stamp are synced
to platform timer in time calibration (1s interval), and
thus doesn't reflect the latest value. If they're not
synced at time suspend, the offset can be lost after S3
resume. Average 0.8s lag-behind is observed for each S3
action, which accumulates to TOD inaccuracy.

Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
---
 xen/arch/x86/time.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 390ef36eb596 -r 4c67985c552e xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Wed Nov 19 13:13:39 2008 +0000
+++ b/xen/arch/x86/time.c       Wed Nov 19 13:17:31 2008 +0000
@@ -585,8 +585,7 @@ static void resume_platform_timer(void)
     if ( plt_src.resume )
         plt_src.resume(&plt_src);
 
-    /* No change in platform_stime across suspend/resume. */
-    platform_timer_stamp = plt_stamp64;
+    plt_stamp64 = platform_timer_stamp;
     plt_stamp = plt_src.read_counter();
 }
 
@@ -1221,6 +1220,9 @@ int time_suspend(void)
         cmos_utc_offset = -get_cmos_time();
         cmos_utc_offset += (wc_sec + (wc_nsec + NOW()) / 1000000000ULL);
         kill_timer(&calibration_timer);
+
+        /* Sync platform timer stamps. */
+        platform_time_calibration();
     }
 
     /* Better to cancel calibration timer for accuracy. */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86, s3: Sync platform stamps at time suspend., Xen patchbot-unstable <=