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

[Xen-changelog] [xen-3.2-testing] x86: Fix host S3.



# 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


 


Rackspace

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