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-3.2-testing] x86: Fix host S3.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] x86: Fix host S3.
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jan 2008 03:00:42 -0800
Delivery-date: Mon, 28 Jan 2008 03:01:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1201516547 0
# Node ID c8c91e2e552e3b614d9c3f33bdc3d89c465d09c8
# Parent  542e1b959e86cb2ee03a682169b1850f2bd96d68
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-unstable changeset:   16882:b321ef006189e10d3b733747f508b1fb608810e9
xen-unstable date:        Fri Jan 25 13:26:38 2008 +0000
---
 xen/arch/x86/time.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 542e1b959e86 -r c8c91e2e552e xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Mon Jan 28 10:35:19 2008 +0000
+++ b/xen/arch/x86/time.c       Mon Jan 28 10:35:47 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-3.2-testing] x86: Fix host S3., Xen patchbot-3.2-testing <=