ia64/xen-unstable

changeset 14292:8117f6684991

linux: Restore time on APs if they are not hotplugged on save/restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Mar 07 16:21:21 2007 +0000 (2007-03-07)
parents 7c8dcc5efd12
children 50d5bf02e59e a7f6392ea850
files linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Wed Mar 07 16:16:09 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Wed Mar 07 16:21:21 2007 +0000
     1.3 @@ -1022,16 +1022,21 @@ void halt(void)
     1.4  }
     1.5  EXPORT_SYMBOL(halt);
     1.6  
     1.7 -/* No locking required. We are only CPU running, and interrupts are off. */
     1.8 +/* No locking required. Interrupts are disabled on all CPUs. */
     1.9  void time_resume(void)
    1.10  {
    1.11 +	unsigned int cpu;
    1.12 +
    1.13  	init_cpu_khz();
    1.14  
    1.15 -	get_time_values_from_xen(0);
    1.16 +	for_each_online_cpu(cpu) {
    1.17 +		get_time_values_from_xen(cpu);
    1.18 +		per_cpu(processed_system_time, cpu) =
    1.19 +			per_cpu(shadow_time, 0).system_timestamp;
    1.20 +		init_missing_ticks_accounting(cpu);
    1.21 +	}
    1.22  
    1.23  	processed_system_time = per_cpu(shadow_time, 0).system_timestamp;
    1.24 -	per_cpu(processed_system_time, 0) = processed_system_time;
    1.25 -	init_missing_ticks_accounting(0);
    1.26  
    1.27  	update_wallclock();
    1.28  }