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

[Xen-changelog] [xen-unstable] linux: Restore time on APs if they are not hotplugged on save/restore.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173284481 0
# Node ID 8117f668499171a4a0ea5486228fa597902b4af0
# Parent  7c8dcc5efd1248a176c964923e0f2571129231b4
linux: Restore time on APs if they are not hotplugged on save/restore.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff -r 7c8dcc5efd12 -r 8117f6684991 
linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Wed Mar 07 16:16:09 
2007 +0000
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Wed Mar 07 16:21:21 
2007 +0000
@@ -1022,16 +1022,21 @@ void halt(void)
 }
 EXPORT_SYMBOL(halt);
 
-/* No locking required. We are only CPU running, and interrupts are off. */
+/* No locking required. Interrupts are disabled on all CPUs. */
 void time_resume(void)
 {
+       unsigned int cpu;
+
        init_cpu_khz();
 
-       get_time_values_from_xen(0);
+       for_each_online_cpu(cpu) {
+               get_time_values_from_xen(cpu);
+               per_cpu(processed_system_time, cpu) =
+                       per_cpu(shadow_time, 0).system_timestamp;
+               init_missing_ticks_accounting(cpu);
+       }
 
        processed_system_time = per_cpu(shadow_time, 0).system_timestamp;
-       per_cpu(processed_system_time, 0) = processed_system_time;
-       init_missing_ticks_accounting(0);
 
        update_wallclock();
 }

_______________________________________________
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®.