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: Fix host S3.

# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201267598 0
# Node ID b321ef006189e10d3b733747f508b1fb608810e9
# Parent  3f5dec2011b0861d24a45dafa6e5b8d2b1033ce5
x86: Fix host S3.

Time zone info just needs to be calculated in S3 suspend procedure.
However, time_suspend() is also called on AP. That wasteful
get_cmos_time() on AP may break __cpu_die() assumption since
get_cmos_time() can take up to one second. This fix just limits it to
running on the BSP.

Signed-off-by: Xu Dongxiao <dongxiao.xu@xxxxxxxxx>
---
 xen/arch/x86/time.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 3f5dec2011b0 -r b321ef006189 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Fri Jan 25 13:23:39 2008 +0000
+++ b/xen/arch/x86/time.c       Fri Jan 25 13:26:38 2008 +0000
@@ -976,8 +976,11 @@ static long cmos_utc_offset; /* in secon
 
 int time_suspend(void)
 {
-    cmos_utc_offset = (wc_sec + (wc_nsec + NOW()) / 1000000000ULL)
-        - get_cmos_time();
+    if ( smp_processor_id() == 0 )
+    {
+        cmos_utc_offset = -get_cmos_time();
+        cmos_utc_offset += (wc_sec + (wc_nsec + NOW()) / 1000000000ULL);
+    }
 
     /* Better to cancel calibration timer for accuracy. */
     kill_timer(&this_cpu(cpu_time).calibration_timer);

_______________________________________________
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: Fix host S3., Xen patchbot-unstable <=